Datepicker doesn't parse manually edited input value using defined format #1107
Description
I'm using datepicker-popup attribute to set date format according to angular $locale service, which depends on browser language settings in my case. The read-only part of the problem works quite nice. The problem is there's no support for date parsing according to this format when user manually sets date in the input field instead of using datepicker popup. The problem is probably on this line:
https://github.com/angular-ui/bootstrap/blob/master/src/datepicker/datepicker.js#L348 - the value is parsed just using new Date(viewValue)
instead of using the format defined in datepicker-popup attribute.
I'd happily fix this issue and make a PR, but I don't know about any easy possibility to parse date value using a format string in JS without using any external library. Any ideas?