fix(datepicker): format time on copy paste as well
This commit is contained in:
parent
9f8749c4ce
commit
99d9efa946
@ -70,7 +70,7 @@ export class Datepicker {
|
|||||||
|
|
||||||
// format the dates before submission
|
// format the dates before submission
|
||||||
element.form.addEventListener('submit', () => {
|
element.form.addEventListener('submit', () => {
|
||||||
if (!this.datepickerInstance.select) return;
|
if (!this.datepickerInstance.select && !element.value) return;
|
||||||
element.value = dateFormat(this.datepickerInstance.select, FORM_DATE_FORMAT);
|
element.value = dateFormat(this.datepickerInstance.select, FORM_DATE_FORMAT);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user