Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(datepicker): don't use the locale in the default formatting function
By default the datepicker would insert the date into the view after passing it through toLocaleDateString. This means that if the user's locale date string couldn't be parsed by `new Date` (e.g. their locale is European which formats the dates as DD/MM/YYYY), the datepicker would have inserted an invalid date. This change switches to using the US date format by default, because it is parse-able by the Date constructor. This shouldn't be unexpected, because the documentation states that users should override the date functions if they're dealing with different kinds of date formats. Fixes angular#7456, angular#7404, angular#8275.
- Loading branch information