jsmy97时间控件,时间范围选择
来源:互联网 发布:短期java培训机构 编辑:程序博客网 时间:2024/05/22 17:03
JQuery日历插件My97DatePicker日期范围限制
作者:Cfans_gpl 时间:2012-12-4 22:40 Tuesday 分类: WEB开发 #坐上电梯直达评论1
<
input
class
=
"Wdate"
id
=
"d1"
onclick
=
"WdatePicker()"
/>
1
<
input
class
=
"Wdate"
id
=
"d2"
onfocus
=
"WdatePicker({skin:'whyGreen',minDate:'2012-12-1',maxDate:'2012-12-20'})"
/>
1
<
input
type
=
"text"
id
=
"d3"
class
=
"Wdate"
onfocus
=
"WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'2012-12-4 21:30:00',maxDate:'2012-12-4 23:59:30'})"
value
=
'2012-12-4 21:30:00'
/>
1
<
input
type
=
"text"
class
=
"Wdate"
id
=
"d4"
onfocus
=
"WdatePicker({dateFmt:'yyyy年M月',minDate:'2012-12',maxDate:'2013-12'})"
/>
1
<
input
class
=
"Wdate"
id
=
"d5"
onfocus
=
"WdatePicker({dateFmt:'H:mm:ss',minDate:'9:00:00',maxDate:'18:30:00'})"
/>
1
<
input
id
=
"d421"
class
=
"Wdate"
type
=
"text"
onfocus
=
"WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})"
/>
1
<
input
id
=
"d422"
class
=
"Wdate"
type
=
"text"
onfocus
=
"WdatePicker({minDate:'%y-%M-{%d+1}'})"
/>
1
<
input
id
=
"d423"
class
=
"Wdate"
type
=
"text"
onfocus
=
"WdatePicker({minDate:'%y-%M-01',maxDate:'%y-%M-%ld'})"
/>
1
<
input
id
=
"d424"
class
=
"Wdate"
type
=
"text"
onfocus
=
"WdatePicker({dateFmt:'yyyy-M-d H:mm:ss',minDate:'%y-%M-%d 7:00:00',maxDate:'%y-%M-{%d+1} 21:00:00'})"
/>
1
<
input
id
=
"d425"
class
=
"Wdate"
type
=
"text"
onClick
=
"WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'%y-%M-%d {%H-20}:%m:%s',maxDate:'%y-%M-%d {%H+30}:%m:%s'})"
/>
1
<
input
id
=
"d4311"
class
=
"Wdate"
type
=
"text"
onFocus
=
"WdatePicker({maxDate:'#F{$dp.$D(\'d4312\')||\'2020-10-01\'}'})"
/>
2
<
input
id
=
"d4312"
class
=
"Wdate"
type
=
"text"
onFocus
=
"WdatePicker({minDate:'#F{$dp.$D(\'d4311\')}',maxDate:'2020-10-01'})"
/>
1
<
input
type
=
"text"
class
=
"Wdate"
id
=
"d4321"
onFocus
=
"WdatePicker({maxDate:'#F{$dp.$D(\'d4322\',{d:-3});}'})"
/>
2
<
input
type
=
"text"
class
=
"Wdate"
id
=
"d4322"
onFocus
=
"WdatePicker({minDate:'#F{$dp.$D(\'d4321\',{d:3});}'})"
/>
1
<
input
type
=
"text"
class
=
"Wdate"
id
=
"d4331"
onFocus
=
"WdatePicker({maxDate:'#F{$dp.$D(\'d4332\',{M:-3,d:-2})||$dp.$DV(\'2020-4-3\',{M:-3,d:-2})}'})"
/>
2
<
input
type
=
"text"
class
=
"Wdate"
id
=
"d4332"
onFocus
=
"WdatePicker({minDate:'#F{$dp.$D(\'d4331\',{M:3,d:2});}',maxDate:'2020-4-3'})"
/>
01
<
script
>
02
//返回一个随机的日期
03
function randomDate(){
04
var Y = 2000 + Math.round(Math.random() * 10);
05
var M = 1 + Math.round(Math.random() * 11);
06
var D = 1 + Math.round(Math.random() * 27);
07
return Y+'-'+M+'-'+D;
08
}
09
</
script
>
10
<
input
type
=
"text"
class
=
"Wdate"
id
=
"d434"
onFocus
=
"var date=randomDate();WdatePicker({minDate:date,maxDate:date})"
/>
1
<
input
id
=
"d441"
type
=
"text"
class
=
"Wdate"
onFocus
=
"WdatePicker({disabledDays:[6]})"
/>
1
<
input
id
=
"d442"
type
=
"text"
class
=
"Wdate"
onFocus
=
"WdatePicker({disabledDays:[0,6]})"
/>
1
<
input
id
=
"d451"
type
=
"text"
class
=
"Wdate"
onFocus
=
"WdatePicker({disabledDates:['5$']})"
/>
2
//注意 :'5$' 表示以 5 结尾 注意 $ 的用法
1
<
input
id
=
"d452"
type
=
"text"
class
=
"Wdate"
onFocus
=
"WdatePicker({disabledDates:['^19']})"
/>
2
//注意:'^19' 表示以 19 开头 注意 ^ 的用法
3
//当然,可以使用minDate实现类似的功能 这里主要是 在演示 ^ 的用法
1
<
input
id
=
"d453"
type
=
"text"
class
=
"Wdate"
onFocus
=
"WdatePicker({minDate:'%y-%M-01',maxDate:'%y-%M-%ld',disabledDates:['0[4-7]$','1[1-5]$','2[58]$']})"
/>
1
<
input
id
=
"d454"
type
=
"text"
class
=
"Wdate"
onFocus
=
"WdatePicker({minDate:'%y-%M-01',maxDate:'%y-%M-%ld',disabledDates:['0[4-7]$','1[1-5]$','2[58]$'],disabledDays:[1,3,6]})"
/>
1
<
input
id
=
"d2a25"
type
=
"text"
class
=
"Wdate"
onFocus
=
"WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',disabledDates:['%y-%M-%d {%H-1}\:..\:..','%y-%M-%d {%H+1}\:..\:..']})"
/>
01
<
script
>
02
function randomH(){
03
//产生一个随机的数字 0-23
04
var H = Math.round(Math.random() * 23);
05
if(H<
10
)
H
=
'0'
+H;
06
//返回 '^' + 数字
07
return '^'+H;
08
}
09
</script>
10
<
input
type
=
"text"
class
=
"Wdate"
id
=
"d456"
onFocus
=
"WdatePicker({dateFmt:'HH:mm:ss',disabledDates:['#F{randomH()}']})"
/>
1
<
input
id
=
"d46"
type
=
"text"
class
=
"Wdate"
onFocus
=
"WdatePicker({opposite:true,disabledDates:['5$']})"
/>
2
//注意 :'5$' 表示以 5 结尾 注意 $ 的用法
1
<
input
id
=
"d471"
type
=
"text"
class
=
"Wdate"
onFocus
=
"WdatePicker({specialDays:[1,5]})"
/>
1
<
input
id
=
"d472"
type
=
"text"
class
=
"Wdate"
onFocus
=
"WdatePicker({specialDates:['....-..-01','....-..-15']})"
/>
0 0
- jsmy97时间控件,时间范围选择
- layui时间控件选择时间范围
- 使用Bootstrap编写时间范围选择控件
- BootStrap dateRangePicker时间范围控件
- 日期时间选择控件
- js时间选择控件
- 时间选择控件
- 时间选择控件
- 时间日期选择控件
- 日期时间选择控件
- bootstrap3 时间选择控件
- android选择时间控件
- extjs 时间范围选择的实现
- phpcms v9 时间控件时间区间选择
- PI ProcessBook图表控件设置时间范围
- jquery实现的时间范围赋值控件
- MxxCalendar 日期时间选择控件
- Extjs4 日期+时间选择控件
- JAVA基础笔记六——多线程
- REST client 基于浏览器的测试工具
- .NET对象的内存布局
- ActionBar搜索栏界面效果
- 深入浅出:Linux设备驱动中的阻塞和非阻塞I/O
- jsmy97时间控件,时间范围选择
- c使用mysql常用的api
- 关于错排公式
- window环境下amr转MP3
- 深入浅出:Linux设备驱动之异步通知和异步I/O
- 2015百度之星资格赛1004
- RHEL7中ISCSI配置
- 相似图片搜索的原理(二)
- C# StringBuilder与String的区别