File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change 968
968
// Remove the `wd` (weekday) class and add `today` class to the
969
969
// current day/week/month (depending on the current scale)
970
970
markNow : function ( element ) {
971
+ var cd = new Date ( ) . setHours ( 0 , 0 , 0 , 0 ) ;
971
972
switch ( settings . scale ) {
972
973
case "weeks" :
973
- var cd = Date . parse ( new Date ( ) ) ;
974
- cd = ( Math . floor ( cd / 36400000 ) * 36400000 ) ;
975
974
$ ( element ) . find ( ':findweek("' + cd + '")' ) . removeClass ( 'wd' ) . addClass ( 'today' ) ;
976
975
break ;
977
976
case "months" :
978
977
$ ( element ) . find ( ':findmonth("' + new Date ( ) . getTime ( ) + '")' ) . removeClass ( 'wd' ) . addClass ( 'today' ) ;
979
978
break ;
980
979
default :
981
- var cd = Date . parse ( new Date ( ) ) ;
982
- cd = ( Math . floor ( cd / 36400000 ) * 36400000 ) ;
983
980
$ ( element ) . find ( ':findday("' + cd + '")' ) . removeClass ( 'wd' ) . addClass ( 'today' ) ;
984
981
break ;
985
982
}
You can’t perform that action at this time.
0 commit comments