Bug fix with the arrows key
This commit is contained in:
@@ -48,36 +48,42 @@
|
|||||||
dispatch('confirm', value);
|
dispatch('confirm', value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const handleKeydown = (event: KeyboardEvent) => {
|
||||||
|
if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {
|
||||||
|
event.stopPropagation();
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<div role="presentation" on:keydown={handleKeydown}>
|
||||||
<ConfirmDialogue
|
<ConfirmDialogue
|
||||||
confirmColor="primary"
|
confirmColor="primary"
|
||||||
cancelColor="secondary"
|
cancelColor="secondary"
|
||||||
title="Change Date"
|
title="Change Date"
|
||||||
prompt="Please select a new date:"
|
prompt="Please select a new date:"
|
||||||
{disabled}
|
{disabled}
|
||||||
on:confirm={handleConfirm}
|
on:confirm={handleConfirm}
|
||||||
on:cancel={handleCancel}
|
on:cancel={handleCancel}
|
||||||
>
|
>
|
||||||
<div class="flex flex-col text-md px-4 py-5 text-center gap-2" slot="prompt">
|
<div class="flex flex-col text-md px-4 py-5 text-center gap-2" slot="prompt">
|
||||||
<div class="mt-2" />
|
<div class="mt-2" />
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<label for="datetime">Date and Time</label>
|
<label for="datetime">Date and Time</label>
|
||||||
<input
|
<input
|
||||||
class="immich-form-label text-sm mt-2 w-full text-black"
|
class="immich-form-label text-sm mt-2 w-full text-black"
|
||||||
id="datetime"
|
id="datetime"
|
||||||
type="datetime-local"
|
type="datetime-local"
|
||||||
bind:value={selectedDate}
|
bind:value={selectedDate}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col w-full">
|
||||||
|
<label for="timezone">Timezone</label>
|
||||||
|
<Dropdown
|
||||||
|
selectedOption={initialOption}
|
||||||
|
options={timezones}
|
||||||
|
render={(item) => (item ? `${item.zone} (${item.offset})` : '(not selected)')}
|
||||||
|
on:select={({ detail: item }) => handleSelect(item)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col w-full">
|
</ConfirmDialogue>
|
||||||
<label for="timezone">Timezone</label>
|
</div>
|
||||||
<Dropdown
|
|
||||||
selectedOption={initialOption}
|
|
||||||
options={timezones}
|
|
||||||
render={(item) => (item ? `${item.zone} (${item.offset})` : '(not selected)')}
|
|
||||||
on:select={({ detail: item }) => handleSelect(item)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ConfirmDialogue>
|
|
||||||
Reference in New Issue
Block a user