fixed DatePicker bug
edit date when Do Not use options props
This commit is contained in:
parent
63e0444e55
commit
d31b080199
2 changed files with 11 additions and 26 deletions
|
@ -295,8 +295,8 @@
|
|||
const parsedDate = parseDate(value, format);
|
||||
|
||||
if (parsedDate instanceof Date) {
|
||||
const options = this.options;
|
||||
if (options.disabledDate && typeof options.disabledDate === 'function' && options.disabledDate(new Date(parsedDate))) {
|
||||
const options = this.options || false;
|
||||
if (options && options.disabledDate && typeof options.disabledDate === 'function' && options.disabledDate(new Date(parsedDate))) {
|
||||
correctValue = oldValue;
|
||||
} else {
|
||||
correctValue = formatDate(parsedDate, format);
|
||||
|
|
|
@ -1,30 +1,15 @@
|
|||
<template>
|
||||
<date-picker :open="true" type="date" placeholder="选择日期" style="width: 200px"><span></span></date-picker>
|
||||
<row>
|
||||
<i-col span="12">
|
||||
<date-picker type="date" placeholder="选择日期" style="width: 200px"></date-picker>
|
||||
</i-col>
|
||||
<i-col span="12">
|
||||
<date-picker type="daterange" placement="bottom-end" placeholder="选择日期" style="width: 200px"></date-picker>
|
||||
</i-col>
|
||||
</row>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
open: false,
|
||||
value3: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick () {
|
||||
this.open = !this.open;
|
||||
},
|
||||
handleChange (date) {
|
||||
this.value3 = date;
|
||||
},
|
||||
c (s) {
|
||||
console.log(s)
|
||||
},
|
||||
clear (s) {
|
||||
console.log(s)
|
||||
},
|
||||
ok (s) {
|
||||
console.log(s)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Reference in a new issue