rsaenen / ngx-custom-validators

Angular custom directives for validation
129 stars 53 forks source link

CustomValidators.date does not work correctly in Safari. #11

Closed Tolitech closed 6 years ago

Tolitech commented 6 years ago

Validation works correctly in Chrome, Firefox, Opera, IE, Edge. However, any valid date is indicated as "invalid" in Safari.

"@angular/core": "^6.0.0", "ngx-custom-validators": "^6.0.0"

Form Group: initialDate: [this.item.initialDate, [CustomValidators.date]]

rsaenen commented 6 years ago

As I have not a Mac, I won't be able to close this issue. A PR is needed.

Tolitech commented 6 years ago

Unfortunately I do not have it either. I tested it on the ipad. let's wait...

rsaenen commented 6 years ago

That could be an issue specific to iOS. I’ll check with Stackblitz in a Apple Store...

rsaenen commented 6 years ago

Released with 6.0.4, can you confirm the fix?

Tolitech commented 6 years ago

I had to change some components to work together. It works. Thank you very much.

https://angular-blnggz.stackblitz.io/

rsaenen commented 6 years ago

The fix has been released with 6.0.5. 6.0.4 has still a bug with Safari OS X and iOS.

FYI, "2018-8-20" is not a valid date but "2018-08-20" is. That was the mistake