-
Notifications
You must be signed in to change notification settings - Fork 24
/
demo.html
36 lines (36 loc) · 1.31 KB
/
demo.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<link rel="stylesheet" href="src/vue.datepicker.css">
</head>
<body>
<div>StartTime:{{startTime}}</div>
<div>EndTime:{{endTime}}</div>
<div>Time:{{time}}</div>
<mz-datepicker en></mz-datepicker>
<mz-datepicker format="yyyy-MM-dd" :start-time.sync="startTime" :end-time.sync="endTime" range en confirm :on-confirm="confrim"></mz-datepicker>
<mz-datepicker format="yyyy-MM-dd HH:mm:ss" clearable :time.sync="time"></mz-datepicker>
<mz-datepicker disabled></mz-datepicker>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.min.js"></script>
<script type="text/javascript" src="src/vue.datepicker.js"></script>
<script type="text/javascript">
new Vue({
el: 'body',
data: {
time: '2016-05-15',
startTime: new Date('2016-03-31').getTime(),
endTime: new Date('2016-03-31').getTime()
},
methods:{
confrim:function(startTime,endTime){
console.log(startTime);
console.log(endTime);
}
}
});
</script>
</body>
</html>