rajeshwarpatlolla/ionic-datepicker

from: new Date() does not allow today

ulion opened this issue · 6 comments

ulion commented

If your local timezone earlier than UTC I guess.

ulion commented

It's indeed not related to UTC, it just use the from value then getTIme(), which will got a value which is later than the 00:00:00 of the current day.

Can you explain the problem clearly. And this component is not specific to local time zone. It works in all the time zones.

ulion commented

when I use from: new Date(), today is not allow be selected,

unless I use from: new Date(year, month, day), then today can be selected

in the code, you should set the from value's hour and minutes/ms all be
zero, else today can not be selected.

2015-11-06 11:52 GMT+08:00 Rajeshwar notifications@github.com:

Can you explain the problem clearly. And this component is not specific to
local time zone. It works in all the time zones.


Reply to this email directly or view it on GitHub
#114 (comment)
.

Ulion

same problem. Any Solution for this ?

ulion commented

it's a clear bug and can be fixed easily, just reset the date's
hour/minute/seconds/ms to zero, or create a new date with the now date
object's year/month/day.

2015-11-29 23:49 GMT+08:00 Rajeshwar notifications@github.com:

You can decrease a day from new Date()


Reply to this email directly or view it on GitHub
#114 (comment)
.

Ulion

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