Files
2019-02-28 19:48:21 +08:00

31 lines
648 B
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>datePicker</title>
<script src="datePicker.js"></script>
</head>
<body>
点击输入框触发
<input id="demo1">
<script>
var calendar = new datePicker();
calendar.init({
'trigger': '#demo1', /*按钮选择器,用于触发弹出插件*/
'type': 'date',/*模式date日期datetime日期时间time时间ym年月*/
'minDate':'1900-1-1',/*最小日期*/
'maxDate':'2100-12-31',/*最大日期*/
'onSubmit':function(){/*确认时触发事件*/
var theSelectData=calendar.value;
},
'onClose':function(){/*取消时触发事件*/
}
});
</script>
</body>
</html>