@@ -1342,8 +1342,8 @@ function FlatpickrInstance(
1342
1342
1343
1343
if ( wrapper . parentNode ) {
1344
1344
while ( wrapper . firstChild )
1345
- wrapper . parentNode ! . insertBefore ( wrapper . firstChild , wrapper ) ;
1346
- wrapper . parentNode ! . removeChild ( wrapper ) ;
1345
+ wrapper . parentNode . insertBefore ( wrapper . firstChild , wrapper ) ;
1346
+ wrapper . parentNode . removeChild ( wrapper ) ;
1347
1347
}
1348
1348
} else
1349
1349
self . calendarContainer . parentNode . removeChild ( self . calendarContainer ) ;
@@ -1683,7 +1683,8 @@ function FlatpickrInstance(
1683
1683
}
1684
1684
} else if (
1685
1685
! self . config . noCalendar &&
1686
- self . daysContainer ! . contains ( e . target as Node ) &&
1686
+ self . daysContainer &&
1687
+ self . daysContainer . contains ( e . target as Node ) &&
1687
1688
e . shiftKey
1688
1689
) {
1689
1690
e . preventDefault ( ) ;
@@ -1740,16 +1741,14 @@ function FlatpickrInstance(
1740
1741
true
1741
1742
) as Date ) . getTime ( ) ,
1742
1743
rangeStartDate = Math . min ( hoverDate , self . selectedDates [ 0 ] . getTime ( ) ) ,
1743
- rangeEndDate = Math . max ( hoverDate , self . selectedDates [ 0 ] . getTime ( ) ) ,
1744
- lastDate = ( self . daysContainer ! . lastChild !
1745
- . lastChild as DayElement ) . dateObj . getTime ( ) ;
1744
+ rangeEndDate = Math . max ( hoverDate , self . selectedDates [ 0 ] . getTime ( ) ) ;
1746
1745
1747
1746
let containsDisabled = false ;
1748
1747
1749
1748
let minRange = 0 ,
1750
1749
maxRange = 0 ;
1751
1750
1752
- for ( let t = rangeStartDate ; t < lastDate ; t += duration . DAY ) {
1751
+ for ( let t = rangeStartDate ; t < rangeEndDate ; t += duration . DAY ) {
1753
1752
if ( ! isEnabled ( new Date ( t ) , true ) ) {
1754
1753
containsDisabled =
1755
1754
containsDisabled || ( t > rangeStartDate && t < rangeEndDate ) ;
@@ -2734,9 +2733,9 @@ function FlatpickrInstance(
2734
2733
self . l10n . amPM [ int ( self . amPM . textContent === self . l10n . amPM [ 0 ] ) ] ;
2735
2734
}
2736
2735
2737
- const min = parseFloat ( input . getAttribute ( "min" ) ! ) ,
2738
- max = parseFloat ( input . getAttribute ( "max" ) ! ) ,
2739
- step = parseFloat ( input . getAttribute ( "step" ) ! ) ,
2736
+ const min = parseFloat ( input . getAttribute ( "min" ) as string ) ,
2737
+ max = parseFloat ( input . getAttribute ( "max" ) as string ) ,
2738
+ step = parseFloat ( input . getAttribute ( "step" ) as string ) ,
2740
2739
curValue = parseInt ( input . value , 10 ) ,
2741
2740
delta =
2742
2741
( e as IncrementEvent ) . delta ||
0 commit comments