diff --git a/src/portal/lib/src/datetime-picker/date-validator.directive.ts b/src/portal/lib/src/datetime-picker/date-validator.directive.ts index 31783862b..a2482e94b 100644 --- a/src/portal/lib/src/datetime-picker/date-validator.directive.ts +++ b/src/portal/lib/src/datetime-picker/date-validator.directive.ts @@ -50,7 +50,8 @@ export function dateValidator(): ValidatorFn { if (controlValue) { const regYMD = /^(19|20)\d\d([- /.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])$/g; const regDMY = /^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$/g; - valid = regYMD.test(controlValue) || regDMY.test(controlValue); + const regMDY = /^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d$/g; + valid = regYMD.test(controlValue) || regDMY.test(controlValue) || regMDY.test(controlValue); } return valid ? Validators.nullValidator diff --git a/src/portal/lib/src/datetime-picker/datetime-picker.component.html b/src/portal/lib/src/datetime-picker/datetime-picker.component.html index ea01d8568..62b753edd 100644 --- a/src/portal/lib/src/datetime-picker/datetime-picker.component.html +++ b/src/portal/lib/src/datetime-picker/datetime-picker.component.html @@ -1,7 +1,6 @@ - -