Closed ash53 closed 7 years ago
@ash53 thanks for reporting this Currently min-date and max-date is exclusive although I am not sure this is suitable.
To go around it, you can set minDate as yesterday.
The second issue, we have an issue reported already #143
The logic seems correct. For current date as minDate, you need to set time to 00:00:00
public isDateDisabled(date: Date) {
let dateInTime = date.getTime();
this.disabledDatesInTime =
this.disabledDatesInTime || (this.disabledDates || []).map(d => d.getTime());
if (this.minDate && (dateInTime < this.minDate.getTime())) {
return true;
} else if (this.maxDate && (dateInTime > this.maxDate.getTime())) {
return true;
} else if (this.disabledDatesInTime.indexOf(dateInTime) >= 0) {
return true
}
return false;
}
If I set [min-date] to present date with new Date(), it won't allow selecting the current date, it lets select from the next date.
If I have two date fields, one start date and another end date, how do I pass the selected start date as the minimum date for end date? Currently, if I do this: