mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
#755 date picker fixes
fix and issue with opening a date picker after typing incorrect date
This commit is contained in:
parent
7ea09bbde0
commit
a3bfd532db
@ -69,7 +69,11 @@ export class DateWidget extends WidgetComponent implements OnInit, AfterViewChec
|
||||
|
||||
onDateChanged() {
|
||||
if (this.field.value) {
|
||||
this.datePicker.time = moment(this.field.value, this.DATE_FORMAT);
|
||||
let value = moment(this.field.value, this.DATE_FORMAT);
|
||||
if (!value.isValid()) {
|
||||
value = moment();
|
||||
}
|
||||
this.datePicker.time = value;
|
||||
}
|
||||
this.checkVisibility(this.field);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user