Skip to content

Commit

Permalink
fix future date determination preventing the next day seen as today
Browse files Browse the repository at this point in the history
  • Loading branch information
SeBassTian23 committed Jan 8, 2020
1 parent 2b74d51 commit e6043d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/jquery.CalendarHeatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@
} ) || null;
},
futureDate: function( str ) {
return moment( str ).diff( moment(), "days" ) > 0 ? true : false;
return moment( str ).diff( moment(), "days" ) >= 0 &&
moment( str ).format( "YYYY-MM-DD" ) !== moment().format( "YYYY-MM-DD" ) ?
true : false;
},
addWeekColumn: function( ) {
if ( this.settings.labels.days ) {
Expand Down

0 comments on commit e6043d4

Please sign in to comment.