update DatePicker
update DatePicker
This commit is contained in:
parent
d170399368
commit
73d10c280b
3 changed files with 51 additions and 6 deletions
|
@ -359,6 +359,7 @@
|
|||
this.internalValue = '';
|
||||
this.value = '';
|
||||
this.$emit('on-clear');
|
||||
this.$dispatch('on-form-change', '');
|
||||
},
|
||||
showPicker () {
|
||||
if (!this.picker) {
|
||||
|
@ -387,11 +388,10 @@
|
|||
|
||||
this.picker.$on('on-pick', (date, visible = false) => {
|
||||
if (!this.confirm) this.visible = visible;
|
||||
|
||||
this.emitChange(date);
|
||||
this.value = date;
|
||||
this.picker.value = date;
|
||||
this.picker.resetView && this.picker.resetView();
|
||||
this.emitChange(date);
|
||||
});
|
||||
|
||||
this.picker.$on('on-pick-clear', () => {
|
||||
|
@ -424,6 +424,7 @@
|
|||
}
|
||||
|
||||
this.$emit('on-change', newDate);
|
||||
this.$dispatch('on-form-change', newDate);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -478,6 +479,14 @@
|
|||
},
|
||||
ready () {
|
||||
if (this.open !== null) this.visible = this.open;
|
||||
},
|
||||
events: {
|
||||
'on-form-blur' () {
|
||||
return false;
|
||||
},
|
||||
'on-form-change' () {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue