@@ -211,7 +211,7 @@ class Calendar extends BaseComponent {
211
211
}
212
212
213
213
// Allow to change the calendarDate but not startDate or endDate
214
- if ( isDateDisabled ( date , this . _config . minDate , this . _config . maxDate , this . _config . disabledDates ) ) {
214
+ if ( isDateDisabled ( date , this . _minDate , this . _maxDate , this . _config . disabledDates ) ) {
215
215
return
216
216
}
217
217
@@ -237,16 +237,16 @@ class Calendar extends BaseComponent {
237
237
event . preventDefault ( )
238
238
239
239
if (
240
- this . _config . maxDate &&
241
- date >= convertToDateObject ( this . _config . maxDate , this . _config . selectionType ) &&
240
+ this . _maxDate &&
241
+ date >= convertToDateObject ( this . _maxDate , this . _config . selectionType ) &&
242
242
( event . key === ARROW_RIGHT_KEY || event . key === ARROW_DOWN_KEY )
243
243
) {
244
244
return
245
245
}
246
246
247
247
if (
248
- this . _config . minDate &&
249
- date <= convertToDateObject ( this . _config . minDate , this . _config . selectionType ) &&
248
+ this . _minDate &&
249
+ date <= convertToDateObject ( this . _minDate , this . _config . selectionType ) &&
250
250
( event . key === ARROW_LEFT_KEY || event . key === ARROW_UP_KEY )
251
251
) {
252
252
return
@@ -338,7 +338,7 @@ class Calendar extends BaseComponent {
338
338
const target = event . target . classList . contains ( CLASS_NAME_CALENDAR_CELL_INNER ) ? event . target . parentElement : event . target
339
339
const date = this . _getDate ( target )
340
340
341
- if ( isDateDisabled ( date , this . _config . minDate , this . _config . maxDate , this . _config . disabledDates ) ) {
341
+ if ( isDateDisabled ( date , this . _minDate , this . _maxDate , this . _config . disabledDates ) ) {
342
342
return
343
343
}
344
344
@@ -504,7 +504,7 @@ class Calendar extends BaseComponent {
504
504
}
505
505
506
506
_selectDate ( date ) {
507
- if ( isDateDisabled ( date , this . _config . minDate , this . _config . maxDate , this . _config . disabledDates ) ) {
507
+ if ( isDateDisabled ( date , this . _minDate , this . _maxDate , this . _config . disabledDates ) ) {
508
508
return
509
509
}
510
510
@@ -724,6 +724,8 @@ class Calendar extends BaseComponent {
724
724
)
725
725
this . _startDate = convertToDateObject ( this . _config . startDate , this . _config . selectionType )
726
726
this . _endDate = convertToDateObject ( this . _config . endDate , this . _config . selectionType )
727
+ this . _minDate = convertToDateObject ( this . _config . minDate , this . _config . selectionType )
728
+ this . _maxDate = convertToDateObject ( this . _config . maxDate , this . _config . selectionType )
727
729
this . _hoverDate = null
728
730
this . _selectEndDate = this . _config . selectEndDate
729
731
}
@@ -804,7 +806,7 @@ class Calendar extends BaseComponent {
804
806
805
807
_cellDayAttributes ( date , month ) {
806
808
const isCurrentMonth = month === 'current'
807
- const isDisabled = isDateDisabled ( date , this . _config . minDate , this . _config . maxDate , this . _config . disabledDates )
809
+ const isDisabled = isDateDisabled ( date , this . _minDate , this . _maxDate , this . _config . disabledDates )
808
810
const isSelected = isDateSelected ( date , this . _startDate , this . _endDate )
809
811
810
812
const classNames = this . _classNames ( {
@@ -833,7 +835,7 @@ class Calendar extends BaseComponent {
833
835
}
834
836
835
837
_cellMonthAttributes ( date ) {
836
- const isDisabled = isMonthDisabled ( date , this . _config . minDate , this . _config . maxDate , this . _config . disabledDates )
838
+ const isDisabled = isMonthDisabled ( date , this . _minDate , this . _maxDate , this . _config . disabledDates )
837
839
const isSelected = isMonthSelected ( date , this . _startDate , this . _endDate )
838
840
839
841
const classNames = this . _classNames ( {
@@ -855,7 +857,7 @@ class Calendar extends BaseComponent {
855
857
}
856
858
857
859
_cellYearAttributes ( date ) {
858
- const isDisabled = isYearDisabled ( date , this . _config . minDate , this . _config . maxDate , this . _config . disabledDates )
860
+ const isDisabled = isYearDisabled ( date , this . _minDate , this . _maxDate , this . _config . disabledDates )
859
861
const isSelected = isYearSelected ( date , this . _startDate , this . _endDate )
860
862
861
863
const classNames = this . _classNames ( {
@@ -877,7 +879,7 @@ class Calendar extends BaseComponent {
877
879
}
878
880
879
881
_rowWeekAttributes ( date ) {
880
- const isDisabled = isDateDisabled ( date , this . _config . minDate , this . _config . maxDate , this . _config . disabledDates )
882
+ const isDisabled = isDateDisabled ( date , this . _minDate , this . _maxDate , this . _config . disabledDates )
881
883
const isSelected = isDateSelected ( date , this . _startDate , this . _endDate )
882
884
883
885
const classNames = this . _classNames ( {
0 commit comments