angular-ui/bootstrap — pull request #2943 by jessedhillon (2014-11-08 17:50:55+00:00)
Title: fix(datepicker): format values received from external model changes

When `ngModel.$render` receives a value updated externally (that is, not as a response to a datepicker event, but some other model update) it does not actually apply configured formatting of any kind. It is assumed that the value is a string, but if it is an instance of `Date` then it is implicitly cast to a string and the element's value is set to that. This fix corrects the behavior by parsing it and applying local filters before assigning the element's value.