rajeshwarpatlolla/ionic-datepicker

inputDate does not get highlighted

jscheeler opened this issue · 13 comments

I'm having an issue when I open the datepicker for the first time, the date that I have set as the inputDate (in this instance July 30, 2015), does not get selected automatically.

It is only when I finally select a date for the first time, will the date that I set remain highlighted each time I open the popup.

My question is: how can I get the inputDate to be selected the first time the datepicker modal or popup is opened?

I duplicated your demo and changed the $scope.datepickerObject.inputDate to July 30th 2015.

http://codepen.io/metercat/pen/MaEope

Please take a look at this demo. It selects the time even before the user selects the time for the first time.

I'm not seeing that action happening. I am only seeing the current day being selected. If you update inputDate to another day, that day will not highlight.

As i mentioned did you had a look at the demo? If still you are facing the same issue, could you please send me the screencast?

Your demo selected the CURRENT DAY. Upon initialization, if you were to change the inputdate to be a date OTHER THAN the current day, it does not highlight that date. I don't believe I need to send you a screencast, the demo I have set up in codepen should be enough to demonstrate the issue I am having. Please let me know what you are not understanding.

If you look at my codepen demo. I have July 30th, 2015 set as the input date. When you open the datepicker, that date is NOT highlighted.

+1

When I set inputDate to what ever date, the picker doesn't highlight on that date.

For example,
in controller.js

$scope.dateObject = {
     inputDate: new Date('2015-10-15'),
     templateType: 'popup'
};

in view.html

<div ionic-datepicker input-obj="dateObject">{{dateObject.inputDate}}</div>

When the popup show, the date 15th on October isn't be highlighted.

@jscheeler and @chompunut. Can you check if my PR fixed it? Just update from master. Then it could be closed.

@renekorss I tested with 1e25159 of your PR and it works. Thank you!

I tested with 1e25159 it is not working if set one date at initialization and changed to different date after ajax success. It is showing only initialized date.

Please fix this!

Bower version has issue. Just download the main branch and try. For me it is working fine

I use bower in my workflow, there's no way to get it OK?

bower install ionic-datepicker#master --save will get you master branch version.

Please check the new release v1.0.0. This issue has been addressed.