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

Datepicker - Changed behaviour when setting value #6288

Closed KarlXOL closed 7 years ago

KarlXOL commented 7 years ago

Still an issue in 2.2.0 Bug description:

I get a date value as string from a remote server (database). Therefore I use a directive with to convert the string to a dateobject and set it with $setViewValue. This works fine until bootstrap version 1.3.3

Since version 2.0.0 the input field validation fails for a field which has been set this way ($invalid is true).

This totally breaks UI-Logic as the user opens a records and the form is showing that previously entered fields are all invalid Link to minimally-working plunker that reproduces the issue:

https://plnkr.co/edit/pKCUSTsf6mfn2OEnMb4A Version of Angular, UIBS, and Bootstrap

Angular: 1.5.5 UIBS: 2.1.1 Bootstrap: 3.3.6

wesleycho commented 7 years ago

Please don't open duplicate issues - there is an adequate resolution as mentioned in the prior issue if you read my responses. I even outlined the approach one could take before binding data to the controller.