This repository has been archived by the owner. It is now read-only.
File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
![ logo] ( http://ww4.sinaimg.cn/large/7d528769gw1fa38h6e3zkj20fa0bhq35.jpg )
2
2
# ejDate.js
3
3
一个简单、易用的的日期选择组件
4
- ##如何使用
4
+ ## 如何使用
5
5
ejDate.js依赖jquery,必须先引入jquery,并将本项目下的dist文件夹内的jquery.ejDate.min.css和jquery.ejDate.min.js引入。
6
- ###初始化
6
+ ### 初始化
7
7
``` html
8
8
<input type =" text" id =" demo_ejdate" >
9
9
```
@@ -19,22 +19,22 @@ $('#demo_ejdate').ejDate({
19
19
});
20
20
```
21
21
![ demo] ( http://ww4.sinaimg.cn/large/7d528769gw1fa38upr5gwj20ab0bc0tb.jpg )
22
- ###配置对象
23
- ####yearULV
22
+ ### 配置对象
23
+ #### yearULV
24
24
年份的上限值,如果指定该属性,ejDate.js会根据该值限制年份的上限,如果不指定上限默认为今年
25
- ####yearDLV
25
+ #### yearDLV
26
26
年份的下限值,作用同上,不指定下限值默认为1970年
27
- ####disabledDateReg
27
+ #### disabledDateReg
28
28
禁用日期的正则表达式,ejDate.js会根据你传入的正则表达式来筛选日期
29
29
` 2016y6m6d ` 正则表达式需要根据该格式的字符串来编写,y代表年,m为月d为日。
30
30
在ejDate.js生成日期时都会生成这么一个对应的字符串,根据你传入的正则表达式来匹配该字符串,如果能匹配,字符串对应的日期将会被禁用。
31
- ####checkedDateFunc
31
+ #### checkedDateFunc
32
32
选中日期后执行的回调函数,可以接收date参数,date参数为选中的日期,是一个JavaScript原生日期对象
33
- ###API
33
+ ### API
34
34
执行ejDate()构造函数后会返回一个ejDate对象,ejDate对象提供了一些简单的api
35
- ####getDate()
35
+ #### getDate()
36
36
获取选中的日期,返回一个JavaScript日期对象
37
- ####setDate(year,month,day)
37
+ #### setDate(year,month,day)
38
38
设置选中的日期,需要传入年月日三个参数
39
39
40
40
You can’t perform that action at this time.
0 commit comments