fixed #201
This commit is contained in:
梁灏 2017-01-13 20:32:24 +08:00
parent d16dce64d6
commit 356953d958
2 changed files with 9 additions and 15 deletions

View file

@ -181,6 +181,7 @@
this.year = this.date.getFullYear(); this.year = this.date.getFullYear();
this.month = this.date.getMonth(); this.month = this.date.getMonth();
if (reset) this.isTime = false;
}, },
prevYear () { prevYear () {
if (this.currentView === 'year') { if (this.currentView === 'year') {

View file

@ -1,21 +1,14 @@
<template> <template>
{{value1}} -- {{ value2 }} <Date-picker type="datetime" placeholder="选择日期和时间" style="width: 200px"></Date-picker>
<row> <br>
<i-col span="12"> <Date-picker type="datetime" format="yyyy-MM-dd HH:mm" placeholder="选择日期和时间(不含秒)" style="width: 200px"></Date-picker>
<Date-picker :value.sync="value1" format="yyyy年MM月dd日" type="date" placeholder="选择日期" style="width: 200px"></Date-picker> <br>
</i-col> <Date-picker type="datetimerange" placeholder="选择日期和时间" style="width: 300px"></Date-picker>
<i-col span="12"> <br>
<Date-picker :value.sync="value2" format="yyyy/MM/dd" type="daterange" placement="bottom-end" placeholder="选择日期" style="width: 200px"></Date-picker> <Date-picker type="datetimerange" format="yyyy-MM-dd HH:mm" placeholder="选择日期和时间(不含秒)" style="width: 300px"></Date-picker>
</i-col>
</row>
</template> </template>
<script> <script>
export default { export default {
data () {
return {
value1: '2016-01-01',
value2: ['2016-01-01', '2016-02-15']
}
}
} }
</script> </script>