fix(datepicker): format time on copy paste as well

This commit is contained in:
Sarah Vaupel 2019-08-12 14:19:37 +02:00
parent 9f8749c4ce
commit 99d9efa946

View File

@ -70,7 +70,7 @@ export class Datepicker {
// format the dates before submission
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);
});
}