File tree 1 file changed +2
-17
lines changed
1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -282,9 +282,6 @@ class DayPicker extends UI5Element {
282
282
let weekday ;
283
283
const _monthsNameWide = localeData . getMonths ( "wide" , this . _calendarDate . _oUDate . sCalendarType ) ;
284
284
285
- this . _minDateObject = new Date ( this . _minDate ) ;
286
- this . _maxDateObject = new Date ( this . _maxDate ) ;
287
-
288
285
const visualizedSelectedDates = this . _getVisualizedSelectedDates ( ) ;
289
286
290
287
/* eslint-disable no-loop-func */
@@ -340,7 +337,7 @@ class DayPicker extends UI5Element {
340
337
if ( this . _isWeekend ( oCalDate ) ) {
341
338
day . classes += " ui5-dp-item--weeekend" ;
342
339
}
343
- if ( ( this . minDate || this . maxDate ) && this . _isOutOfSelectableRange ( oCalDate ) ) {
340
+ if ( this . _isOutOfSelectableRange ( oCalDate ) ) {
344
341
day . classes += " ui5-dp-item--disabled" ;
345
342
day . disabled = true ;
346
343
}
@@ -863,19 +860,7 @@ class DayPicker extends UI5Element {
863
860
}
864
861
865
862
_isOutOfSelectableRange ( date ) {
866
- const currentDate = date . _oUDate ? date . toLocalJSDate ( ) : CalendarDate . fromTimestamp ( date ) . toLocalJSDate ( ) ;
867
- const minDate = this . _minDateObject ;
868
- const maxDate = this . _maxDateObject ;
869
-
870
- currentDate . setHours ( 0 ) ;
871
- if ( minDate ) {
872
- minDate . setHours ( 0 ) ;
873
- }
874
- if ( maxDate ) {
875
- maxDate . setHours ( 0 ) ;
876
- }
877
-
878
- return currentDate > maxDate || currentDate < minDate ;
863
+ return date . valueOf ( ) < this . _minDate || date . valueOf ( ) > this . _maxDate ;
879
864
}
880
865
881
866
get _maxDate ( ) {
You can’t perform that action at this time.
0 commit comments