-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDatePicker_mobi.html
211 lines (186 loc) · 5.88 KB
/
DatePicker_mobi.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="user-scalable=0, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<meta content="telephone=no" name="format-detection" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<title>无标题文档</title>
<link rel="stylesheet" href="css/asdui1.4b.css" type="text/css" media="all" />
<style type="text/css">
a:link,a:visited{color:#f00; text-decoration:underline}
fieldset{margin:20px 10px}
pre{border:1px solid #fc0;background:#ffd;padding:5px}
fieldset{margin:20px;padding:20px;text-align:left}
fieldset legend{padding:5px 10px;font-weight:700;font-size:16px}
table.op{color:#333;background:#E8F5FE;border-collapse:collapse;width:100%;text-align:left;}
thead{}
table.opt head th{padding:1em 1em .5em;border:1px solid #5C9CC0;font-size:120%;background:#5C9CC0;text-align:left}
table.op thead tr{}
table.op td{padding:.5em 1em;border:1px solid #BBE1F1}
table.op tbody td{background:#EEFAFF;}
table.op tfoot{background-color:#A9C9E2;}
table.op tfoot td{padding-bottom:1.5em;border:1px solid #BBE1F1}
dl{padding:10px 5px}
dl dt{font-weight:700;font-sie:14px;padding:5px 0;}
dl dt span{color:#f60;padding:0 8px}
pre{border:1px solid #ADCD3C;background-color:#F2FDDB;padding:5px;white-space: pre-wrap;
word-wrap: break-word;}
#here{width:250px;height:350px;border:2px solid #f00}
.dpholiy{background-color:#ffd}
</style>
</head>
<body>
<fieldset style="top:inherit" id="Dps">
<legend>YafullyBox.Dp Class</legend>
<input name="" type="text" class="areas" value=""/><input name="" id="b" type="text" class="areas" value=""/><input name="" type="text" class="areas2" id="eXDP" style="border:1px solid #f00"/><button id="callDp">调用日历</button><button onClick="Sexy7.detach()">禁用日历</button><button onClick="Sexy7.attach()">启用日历</button>
</fieldset>
<div style="position:absolute;top:50px;right:5px;"><input name="" type="text" class="areas"/></div>
<div style="position:absolute;bottom:0;right:5px;"><input name="" type="text" class="areas"/></div>
<div style="position:absolute;bottom:50px;left:5px;"><input name="" type="text" class="areas"/></div>
<br><br><br>
<div id="here"><input name="" type="text" class="comeDp" id="ExDp" value=""/></div>
<fieldset><legend>ASDUI.Dp.Class</legend>
<dl>
<dt>调用方法:</dt>
<dd>
<pre>var myshake = new ASDUI.Dp(elements,[, options]);</pre>
</dd>
<dt>一个藏袍:</dt>
<dd>
<pre>
Sexy7 = new ASDUI.Dp('input.areas',{time:true});
Sexy8 = new ASDUI.Dp('input.areas');
</pre>
</dd>
</dl>
<table class="op">
<col id="middle" />
<col />
<col />
<thead>
<tr><th>Option</th>
<th>参数描述</th></tr>
</thead>
<tfoot>
</tfoot>
<tbody>
<tr>
<td>Dparea</td>
<td>需要委托日期控件的容器Id,可以为空,当为空时默认容器对象为document.body;</td>
</tr>
<tr><td>CzIndex</td>
<td>日期控件的z-index</td>
</tr>
<tr>
<td>Cwidth</td>
<td>日期控件的宽度</td>
</tr>
<tr>
<td>Cheight</td>
<td>日期控件的高度(一般不需要设置默认为"auto")</td>
</tr>
<tr>
<td>hovClass</td>
<td>鼠标经过日期的样式,默认值为dp_roll</td>
</tr>
<tr>
<td>secClass</td>
<td>选择日期的样式,默认值为dp_selected</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td>onSelect(fn)</td>
<td>当选择日期后执行的回调函数,该函数指向DP外框</td>
</tr>
<tr>
<td>onChange(fn)</td>
<td>当年份、月份改变时执行的回调函数,该函数指向DOM本身</td>
</tr>
<tr>
<td>static</td>
<td>日期控件显示在指定的目标元素的ID,默认值为false</td>
</tr>
<tr>
<td>mark</td>
<td>需要指定标识的日期,默认为空数组;格式为['2013|1|1','2013|2|14',...]</td>
</tr>
<tr>
<td>time</td>
<td>是否显示时间选项(可选true,false)</td>
</tr>
<tr>
<td>yearRange</td>
<td>最大可选年个数</td>
</tr>
<tr>
<td>yearOrder</td>
<td>年的排列顺序(可选desc,asc)</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<dl>
<dt>外置方法:<span>.create(element,empt);</span>在新的对象上附加日历</dt>
<dd>
<pre>
//empt true,false可选是否以当前系统日期为起始否为上一次调用的时间
Sexy7 = new ASDUI.Dp('areas',{time:true});
var mydp = $('a');
$('callDp').addEvent('click',function(e){
e.stopPropagation();
Sexy7.create(mydp,true)
});
</pre>
</dd>
<dt>外置方法:<span>.attach();</span>启用日历</dt>
<dd>
<pre>
Sexy7.attach()
</pre>
</dd>
<dt style="visibility:visible">外置方法:<span>.attach();</span>禁用日历</dt>
<dd>
<pre>
Sexy7.detach()
</pre>
</dd>
</dl>
</fieldset>
<script type="text/javascript" src="js/jquery1.91.min.js"></script>
<script src="js/lovevox_mobi.js" type="text/javascript"></script>
<script type="text/javascript">
Sexy7 = new ZUI.Dp('input.areas',{format:'yyyy-mm-dd-hh:mn:ss'});
dp = new ZUI.Dp('input.comeDp',{
time:false,
static:'here',
mark:['2013|1|1','2013|2|14','2013|3|12','2013|6|1','2013|6|8','2013|6|12','2013|6|15','2013|6|20','2013|6|22'],
onSelect:function(){
//console.log(this.dpBox);
},
onChange:function(){
//console.log(this.Boxon);
}
}).create($('#ExDp'),true);
$(document).ready(function(){
var mydp = $('#eXDP');
$('#callDp').on('click',function(e){
e.stopPropagation();
Sexy7.create(mydp,true)
});
//console.log($.browser.ie);
console.log($.browser.msie);
console.log($.browser.webkit);
console.log($.browser.version);
console.log($.browser.desktop);
console.log($.browser.mobile);
});
</script>
</body>
</html>