From 9a978d6a9bc1e84b8f3e3ab5e041d9f2f7639661 Mon Sep 17 00:00:00 2001 From: bpnetguy Date: Mon, 2 May 2016 09:45:31 -0700 Subject: [PATCH] Update DateTimePickerDays.js Fix bug daysOfWeekDisabled don't play well with minDate / maxDate --- src/DateTimePickerDays.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DateTimePickerDays.js b/src/DateTimePickerDays.js index 11fae8ed..5c60a346 100644 --- a/src/DateTimePickerDays.js +++ b/src/DateTimePickerDays.js @@ -56,7 +56,7 @@ export default class DateTimePickerDays extends Component { if ((minDate && prevMonth.isBefore(minDate)) || (maxDate && prevMonth.isAfter(maxDate))) { classes.disabled = true; } - if (this.props.daysOfWeekDisabled.length > 0) classes.disabled = this.props.daysOfWeekDisabled.indexOf(prevMonth.day()) !== -1; + if (this.props.daysOfWeekDisabled.length > 0) classes.disabled = classes.disabled || this.props.daysOfWeekDisabled.indexOf(prevMonth.day()) !== -1; cells.push({prevMonth.date()}); if (prevMonth.weekday() === moment().endOf("week").weekday()) { row = {cells};