mirror of
https://github.com/immich-app/immich.git
synced 2025-01-07 00:50:23 -05:00
fix(web): six digit year input (#10517)
This commit is contained in:
parent
61a5d67674
commit
1129020159
1 changed files with 6 additions and 0 deletions
|
@ -5,7 +5,11 @@
|
|||
type: 'date' | 'datetime-local';
|
||||
}
|
||||
|
||||
export let type: $$Props['type'];
|
||||
export let value: $$Props['value'] = undefined;
|
||||
export let max: $$Props['max'] = undefined;
|
||||
|
||||
$: fallbackMax = type === 'date' ? '9999-12-31' : '9999-12-31T23:59';
|
||||
|
||||
// Updating `value` directly causes the date input to reset itself or
|
||||
// interfere with user changes.
|
||||
|
@ -14,7 +18,9 @@
|
|||
|
||||
<input
|
||||
{...$$restProps}
|
||||
{type}
|
||||
{value}
|
||||
max={max || fallbackMax}
|
||||
on:input={(e) => (updatedValue = e.currentTarget.value)}
|
||||
on:blur={() => (value = updatedValue)}
|
||||
on:keydown={(e) => {
|
||||
|
|
Loading…
Reference in a new issue