You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is sending the date.date property into indexOf, but date.date is a string representation of the date. It should send date.dateObj to compare the full date object.
However, even if you fix that it still doesn't work, because there is an offset on the time. If you run this code:
scope.classesFor=function(date){for(vari=0;i<selectedDates.length;i++){vard1=selectedDates[i],d2=date.dateObj;console.log('compare %s with %s',d1,d2);console.log('compare %d with %d',d1.getTime(),d2.getTime());}varextraClasses=indexOf.call(selectedDates,date.dateObj)>=0 ? 'pickadate-active' : null;returndate.classNames.concat(extraClasses);};
And you reach the same day that is selected, you end up with this; note the time offset which will always cause the comparison to fail:
compare Tue Feb 03 2015 00:00:00 GMT-0500 (EST) with Tue Feb 03 2015 03:00:00 GMT-0500 (EST)
(index):28
compare 1422939600000 with 1422950400000
The text was updated successfully, but these errors were encountered:
Hi, I noticed the
.pickadate-active
class is not getting set.I found a few potential issues:
That is sending the
date.date
property intoindexOf
, butdate.date
is a string representation of the date. It should senddate.dateObj
to compare the full date object.However, even if you fix that it still doesn't work, because there is an offset on the time. If you run this code:
And you reach the same day that is selected, you end up with this; note the time offset which will always cause the comparison to fail:
The text was updated successfully, but these errors were encountered: