diff --git a/src/lib/components/Time.svelte b/src/lib/components/Time.svelte index a4b3598..64de239 100644 --- a/src/lib/components/Time.svelte +++ b/src/lib/components/Time.svelte @@ -136,7 +136,7 @@ $: innerHours = positions(isMinuteView ? 180 : 120, 110, isMinuteView ? '00' : '12', isMinuteView, 12); /** - * + * * @param {number} value * @param {boolean} asMeridian */ @@ -197,7 +197,7 @@ return startDate.getHours() === innerDate.getHours() && startDate.getMinutes() > val; } return startDate.getHours() > val; - } + } if (endDate && endDate.getDate() === innerDate.getDate() && endDate.getMonth() === innerDate.getMonth() @@ -230,7 +230,7 @@ innerDate[setter](val); } else if (isMinuteView) { - // compute it out of x,y + // compute it out of x,y const rect = clockEl.getBoundingClientRect(); const clientX = e.clientX - rect.left; const clientY = e.clientY - rect.top; @@ -286,7 +286,7 @@ innerDate.setMinutes(degree); } innerDate = innerDate; - + // handle only final click, not mouse move if (!handleMoveMove) { dispatch(isMinuteView ? 'minute' : 'hour', { @@ -310,7 +310,8 @@ innerDate = innerDate; dispatch(isMinuteView ? 'minute' : 'hour', { value: innerDate, - isKeyboard: e.type === 'keyboard' + // isKeyboard: e.type === 'keyboard' + isKeyboard: true }); } @@ -330,31 +331,38 @@