File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 122
122
checkStopPropagation ,
123
123
getDayNames ,
124
124
getDefaultMarker ,
125
- isIOS ,
125
+ isTouchDevice ,
126
126
unrefElement ,
127
127
} from ' @/utils/util' ;
128
128
import { useArrowNavigation , useDefaults } from ' @/composables' ;
382
382
};
383
383
384
384
const onDateSelect = (ev : Event , dayVal : ICalendarDay , isClick = true ) => {
385
- if (! isClick && isIOS ()) return ;
385
+ if (! isClick && isTouchDevice ()) return ;
386
386
if (! defaultedMultiDates .value .enabled || defaultedConfig .value .allowPreventDefault ) {
387
387
checkStopPropagation (ev , defaultedConfig .value );
388
388
emit (' select-date' , dayVal );
Original file line number Diff line number Diff line change @@ -319,6 +319,10 @@ export const isIOS = () => {
319
319
) ;
320
320
} ;
321
321
322
+ export const isTouchDevice = ( ) => {
323
+ return 'ontouchstart' in window || navigator . maxTouchPoints > 0 ;
324
+ } ;
325
+
322
326
export const getMapKeyType = ( monthPicker : boolean , yearPicker : boolean ) : MAP_KEY_FORMAT => {
323
327
if ( monthPicker ) return MAP_KEY_FORMAT . MONTH_AND_YEAR ;
324
328
if ( yearPicker ) return MAP_KEY_FORMAT . YEAR ;
You can’t perform that action at this time.
0 commit comments