Open AnirudhaGohokar opened 7 years ago
For now I have fixed this issue by stripping out the time in isDayEnabled
function and it seems to be working good.
this.isDayEnabled = function (day) {
var min_date = this.minDate ? moment(this.minDate).startOf('day').toDate() : false;
var max_date = this.maxDate ? moment(this.maxDate).startOf('day').toDate() : false;
var current_date = moment(day).startOf('day').toDate();
var isEnabled = (!min_date || min_date <= current_date) &&
(!max_date || max_date >= current_date) &&
(!self.dateFilter || !self.dateFilter(current_date));
return isEnabled;
};
Hi,
When using mdp-max-date and mpd-min-date, the comparison is being done with time as well. So, consider this
will evaluate to false even though the dates match becuase
current date > max date
A simple change of doing comparison based on date only in
isDayEnabled
function should fix the issue.