Commit 0e31618388f6ce998258b94bddd1cd31769bebfc
1 parent
ba1422cd
update demo
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
examples/routers/date.vue
1 | 1 | <template> |
2 | 2 | <div> |
3 | 3 | {{ value1 }} |
4 | - <Date-picker v-model="value1" placeholder="选择日期" style="width: 200px"></Date-picker> | |
4 | + <Date-picker v-model="value1" :editable="false" type="datetimerange" placeholder="选择日期" style="width: 200px"></Date-picker> | |
5 | 5 | <Button @click="setDate">set date</Button> |
6 | 6 | <Button @click="getDate">get date</Button> |
7 | 7 | <!--<Date-picker v-model="value2" type="daterange" placeholder="选择日期" style="width: 200px"></Date-picker>--> |
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | export default { |
13 | 13 | data () { |
14 | 14 | return { |
15 | - value1: '2017-10-23', | |
15 | + value1: ['2017-10-10', '2017-10-20'], | |
16 | 16 | value2: [] |
17 | 17 | } |
18 | 18 | }, |
... | ... | @@ -21,7 +21,7 @@ |
21 | 21 | console.log(date); |
22 | 22 | }, |
23 | 23 | setDate () { |
24 | - this.value1 = '2017-09-20'; | |
24 | + this.value1 = ['2016-10-10', '2017-10-10']; | |
25 | 25 | }, |
26 | 26 | getDate () { |
27 | 27 | const date = new Date(this.value1); | ... | ... |