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
d314afb6
Commit
d314afb6
authored
Jun 08, 2015
by
hbcui1984
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hello mui中将native模式的日期控件和H5模式的日期控件放在一起
parent
0a76f890
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
5 deletions
+107
-5
examples/hello-mui/examples/date.html
examples/hello-mui/examples/date.html
+90
-0
examples/hello-mui/list.html
examples/hello-mui/list.html
+17
-5
No files found.
examples/hello-mui/examples/date.html
0 → 100644
View file @
d314afb6
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
Hello MUI
</title>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no"
>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black"
>
<!--标准mui.css-->
<link
rel=
"stylesheet"
href=
"../css/mui.min.css"
>
<!--App自定义的css-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../css/app.css"
/>
<style>
#info
{
padding
:
20px
10px
;
}
.mui-btn
{
font-size
:
16px
;
padding
:
8px
;
margin
:
3px
;
}
</style>
</head>
<body>
<header
class=
"mui-bar mui-bar-nav"
>
<a
class=
"mui-action-back mui-icon mui-icon-left-nav mui-pull-left"
></a>
<h1
class=
"mui-title"
>
native模式
</h1>
</header>
<div
class=
"mui-content"
>
<div
class=
"mui-content-padded"
>
<h5
class=
"mui-content-padded"
>
日期示例
</h5>
<button
id=
'pickDateBtn'
type=
"button"
class=
"mui-btn mui-btn-block"
>
选择日期
</button>
<h5
class=
"mui-content-padded"
>
时间示例
</h5>
<button
id=
'pickTimeBtn'
type=
"button"
class=
"mui-btn mui-btn-block"
>
选择时间
</button>
<div
id=
"info"
>
</div>
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
>
//mui初始化
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
var
info
=
document
.
getElementById
(
"
info
"
);
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>
</body>
</html>
\ No newline at end of file
examples/hello-mui/list.html
View file @
d314afb6
...
...
@@ -86,6 +86,23 @@
checkbox(复选框)
</a>
</li>
<li
class=
"mui-table-view-cell mui-collapse"
>
<a
class=
"mui-navigate-right"
href=
"#"
>
date time(日期时间)
</a>
<ul
class=
"mui-table-view mui-table-view-chevron"
>
<li
class=
"mui-table-view-cell"
>
<a
class=
"mui-navigate-right"
href=
"examples/dtpicker.html"
>
H5模式
</a>
</li>
<li
class=
"mui-table-view-cell"
>
<a
class=
"mui-navigate-right"
href=
"examples/date.html"
>
native模式
</a>
</li>
</ul>
</li>
<li
class=
"mui-table-view-cell"
>
<a
class=
"mui-navigate-right"
href=
"examples/dialog.html"
>
dialog(消息框)
...
...
@@ -331,11 +348,6 @@
</li>
<li
class=
"mui-table-view-divider"
>
模板
</li>
<li
class=
"mui-table-view-cell"
>
<a
class=
"mui-navigate-right"
href=
"examples/dtpicker.html"
>
dtpicker(日期时间选择器)
</a>
</li>
<li
class=
"mui-table-view-cell"
>
<a
class=
"mui-navigate-right"
href=
"examples/imageviewer-new.html"
>
image viewer(图片预览)
...
...
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