forked from jmug/cactoide
hotfix: prevent to use arrows in datepicker
This commit is contained in:
@@ -139,6 +139,11 @@
|
|||||||
bind:value={eventData.date}
|
bind:value={eventData.date}
|
||||||
min={today}
|
min={today}
|
||||||
class="border-dark-300 w-full rounded-sm border-2 bg-white px-4 py-3 text-slate-900 shadow-sm transition-all duration-200"
|
class="border-dark-300 w-full rounded-sm border-2 bg-white px-4 py-3 text-slate-900 shadow-sm transition-all duration-200"
|
||||||
|
on:keydown={(e) => {
|
||||||
|
if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}}
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
{#if errors.date}
|
{#if errors.date}
|
||||||
|
|||||||
@@ -162,6 +162,11 @@
|
|||||||
bind:value={eventData.date}
|
bind:value={eventData.date}
|
||||||
min={today}
|
min={today}
|
||||||
class="border-dark-300 w-full rounded-sm border-2 bg-white px-4 py-3 text-slate-900 shadow-sm transition-all duration-200"
|
class="border-dark-300 w-full rounded-sm border-2 bg-white px-4 py-3 text-slate-900 shadow-sm transition-all duration-200"
|
||||||
|
on:keydown={(e) => {
|
||||||
|
if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}}
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
{#if errors.date}
|
{#if errors.date}
|
||||||
|
|||||||
Reference in New Issue
Block a user