Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mui
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mui
Commits
4aaecf41
Commit
4aaecf41
authored
Dec 13, 2014
by
hbcui1984
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加pickDate和pickTime演示
parent
8cbe93f3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
examples/hello-mui/examples/dialog.html
examples/hello-mui/examples/dialog.html
+26
-0
No files found.
examples/hello-mui/examples/dialog.html
View file @
4aaecf41
...
@@ -40,6 +40,8 @@
...
@@ -40,6 +40,8 @@
<button
id=
'confirmBtn'
class=
"mui-btn mui-btn-blue mui-btn-outlined"
>
确认消息框
</button>
<button
id=
'confirmBtn'
class=
"mui-btn mui-btn-blue mui-btn-outlined"
>
确认消息框
</button>
<button
id=
'promptBtn'
class=
"mui-btn mui-btn-blue mui-btn-outlined"
>
输入对话框
</button>
<button
id=
'promptBtn'
class=
"mui-btn mui-btn-blue mui-btn-outlined"
>
输入对话框
</button>
<button
id=
'toastBtn'
class=
"mui-btn mui-btn-blue mui-btn-outlined"
>
自动消失提示框
</button>
<button
id=
'toastBtn'
class=
"mui-btn mui-btn-blue mui-btn-outlined"
>
自动消失提示框
</button>
<button
id=
'pickDateBtn'
class=
"mui-btn mui-btn-blue mui-btn-outlined"
>
日期选择框
</button>
<button
id=
'pickTimeBtn'
class=
"mui-btn mui-btn-blue mui-btn-outlined"
>
时间选择框
</button>
<div
id=
"info"
>
<div
id=
"info"
>
</div>
</div>
...
@@ -79,6 +81,30 @@
...
@@ -79,6 +81,30 @@
document
.
getElementById
(
"
toastBtn
"
).
addEventListener
(
'
tap
'
,
function
(){
document
.
getElementById
(
"
toastBtn
"
).
addEventListener
(
'
tap
'
,
function
(){
mui
.
toast
(
'
欢迎体验Hello MUI
'
);
mui
.
toast
(
'
欢迎体验Hello MUI
'
);
});
});
document
.
getElementById
(
"
pickDateBtn
"
).
addEventListener
(
'
tap
'
,
function
()
{
var
dDate
=
new
Date
();
dDate
.
setFullYear
(
2014
,
7
,
16
);
var
minDate
=
new
Date
();
minDate
.
setFullYear
(
2010
,
0
,
1
);
var
maxDate
=
new
Date
();
maxDate
.
setFullYear
(
2016
,
11
,
31
);
plus
.
nativeUI
.
pickDate
(
function
(
e
)
{
var
d
=
e
.
date
;
info
.
innerText
=
'
您选择的日期是:
'
+
d
.
getFullYear
()
+
"
-
"
+
(
d
.
getMonth
()
+
1
)
+
"
-
"
+
d
.
getDate
();
},
function
(
e
){
info
.
innerText
=
"
您没有选择日期
"
;
},{
title
:
"
请选择日期
"
,
date
:
dDate
,
minDate
:
minDate
,
maxDate
:
maxDate
});
})
document
.
getElementById
(
"
pickTimeBtn
"
).
addEventListener
(
'
tap
'
,
function
()
{
var
dTime
=
new
Date
();
dTime
.
setHours
(
6
,
0
);
plus
.
nativeUI
.
pickTime
(
function
(
e
){
var
d
=
e
.
date
;
info
.
innerText
=
"
您选择的时间是:
"
+
d
.
getHours
()
+
"
:
"
+
d
.
getMinutes
();
},
function
(
e
){
info
.
innerText
=
"
您没有选择时间
"
},{
title
:
"
请选择时间
"
,
is24Hour
:
true
,
time
:
dTime
});
});
</script>
</script>
<style
type=
"text/css"
>
<style
type=
"text/css"
>
.mui-btn
{
.mui-btn
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment