angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.29k stars 6.73k forks source link

fix(datepicker): support string in the non-HTML5 formatter #6439

Open byronigoe opened 7 years ago

byronigoe commented 7 years ago

support string in the non-HTML5 formatter, e.g. JSON date

byronigoe commented 7 years ago

For my use case of using a JSON date, I also needed to enhance the validator: if (angular.isString(value)) { return !isNaN(parseDateString(value)) || value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.000Z$/); }