DatePicker, TimePicker support value null

This commit is contained in:
梁灏 2021-09-15 17:58:03 +08:00
parent 6ebd9456f0
commit 0ddc59a168

View file

@ -805,11 +805,12 @@
},
},
mounted () {
const initialValue = this.value;
const parsedValue = this.publicVModelValue;
if (typeof initialValue !== typeof parsedValue || JSON.stringify(initialValue) !== JSON.stringify(parsedValue)){
this.$emit('input', this.publicVModelValue); // to update v-model
}
// null
// const initialValue = this.value;
// const parsedValue = this.publicVModelValue;
// if (typeof initialValue !== typeof parsedValue || JSON.stringify(initialValue) !== JSON.stringify(parsedValue)){
// this.$emit('input', this.publicVModelValue); // to update v-model
// }
if (this.open !== null) this.visible = this.open;
// to handle focus from confirm buttons