uib-datepicker-popup formatting problem
Hi,
There seems to be a problem with uib-datepicker-popup and formatting. I am currently using version 0.14.2 but I can confirm that affected was also 0.14.1. The problem is when I declare in html datepicker popup like this:
<input ...uib-datepicker-popup="dd/MM/yyyy"... /> - the date will not be in displayed
When I fallback to
<input ...datepicker-popup="dd/MM/yyyy"... /> - the date will be displayed correctly but I see the deprecation message.
It seems to be a regression in behavior for datepicker-popup. Also note that uib-datepicker-popup="yyyy-MM-dd" works as expected. But when you change the format to anything different the dates are not displayed anymore.
@alphapilgrim, sorry, it's been too long at this point. are you asking if it's a known bug in 0.14.3? if so, i have no idea. if it's a bug in master, we can certainly take a look if a proper issue w/ reproduction is filed.
@MuhammadTayyeb please do not hijack threads. if you require support, please read our project README for how to properly ask for (and receive) help.
Kindly see the attachment. when i am edit the date. but they can't show the Edit date. but it will available in backend
i use same DatePicker which you. i have issue occur when i am edit the datepciker
I am had a similar problem. I use DatePicker popup in many places and I had this behavior:
- No issue when entering the date the first time;
- Issue when presenting the form for update. In spite the fact that the date is in ng-model and DatePicker show it when you open the calendar, the bar is blank.
Here 2 samples of the situation I described with the json of the objects and the dates. You see that the first one has the issue, the second no.


Observing the dates I realized that the ones coming from user input have milliseconds, the ones coming from DB do not have milliseconds. I changed the code to have the milliseconds and everything worked fine. The simplest way is doing something like this:
var dateForDatePicker = new Date (dateFromDB);
and everything is working fine, with any formatting string.
I confirm, also if the variable is a DateTime coming from a DB, during initialization you have to do:
yourDate = new Date(yourDate);
and everything works, no format issue.