Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Datepicker does not validate when bound to a ISO date string? #4424

Closed
bp5800 opened this issue Sep 16, 2015 · 4 comments
Closed

Datepicker does not validate when bound to a ISO date string? #4424

bp5800 opened this issue Sep 16, 2015 · 4 comments

Comments

@bp5800
Copy link

bp5800 commented Sep 16, 2015

The date picker no longer validates when it is passed an ISO date string.
Plunk
This is a consequence of #4062.

@wesleycho
Copy link
Contributor

The PR linked makes it clear - we are no longer supporting that due to various cross-browser issues & more.

@bp5800
Copy link
Author

bp5800 commented Sep 16, 2015

The PR makes it clear you don't want to accept arbitrary strings that the browser interprets as a date using new Date().

I'm getting dates from a web service in this format. It seems this would be fairly common. It seems to me you should be able to handle this particular format.

@wesleycho
Copy link
Contributor

Problem is that different browsers will even handle ISO dates in different and unexpected ways - it also overly complicated the model-view interplay with ng-model. The best workaround on the user's side is to convert it to a date object before binding to the model - for any properly built application, this should be a trivial change since there should always be a parsing layer that converts the api response before binding to a model.

@bp5800
Copy link
Author

bp5800 commented Sep 16, 2015

Okay, I will (with regret) leave it at that. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants