date.vue
2.36 KB
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
<style>
body{
height: auto !important;
}
</style>
<template>
<row>
<i-col span="12">
<Time-picker :value="value" type="time" placeholder="选择时间" style="width: 168px"></Time-picker>
</i-col>
<!--<i-col span="12">-->
<!--<date-picker :value="value3" type="daterange" placement="bottom-start" placeholder="选择日期" style="width: 200px"></date-picker>-->
<!--</i-col>-->
<!--<i-col span="12">-->
<!--<time-picker-->
<!--:value="value"-->
<!--placeholder="选择时间"-->
<!--format="HH:mm:ss"-->
<!--:hide-disabled-options="false"-->
<!--:disabled-hours="[1,2,10,11]"-->
<!--@on-change="c"-->
<!--@on-ok="ok"-->
<!--@on-clear="clear"-->
<!--style="width: 168px"></time-picker>-->
<!--</i-col>-->
<i-col span="12">
<Date-picker :value="value1" format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="选择日期时间" style="width: 200px" @on-change="c"></Date-picker>
<!--<time-picker-->
<!--:value="value2"-->
<!--type="timerange"-->
<!--placeholder="选择时间"-->
<!--format="HH:mm:ss"-->
<!--:hide-disabled-options="false"-->
<!--@on-change="c"-->
<!--@on-ok="ok"-->
<!--@on-clear="clear"-->
<!--style="width: 168px"></time-picker>-->
</i-col>
<i-button @click="time">time</i-button>
</row>
</template>
<script>
export default {
data () {
return {
// value: '2016-12-12 03:03:03',
value1: '2015-12-12 09:41',
value: '03:12:01',
value2: ['08:40:00', '09:40:00'],
// value2: [new Date(), new Date()],
value3: ['2016-12-01', '2016-12-25']
}
},
methods: {
c (s) {
console.log(s);
// this.value2 = s;
},
ok () {
console.log('ok');
},
clear () {
console.log('clear');
},
time () {
this.value = new Date();
}
}
}
</script>