mirror of
https://github.com/immich-app/immich.git
synced 2024-11-15 18:08:48 -07:00
fix(web): date input on chrome (#7669)
This commit is contained in:
parent
9125999d1a
commit
52a52f9f40
@ -6,19 +6,15 @@
|
||||
}
|
||||
|
||||
export let value: $$Props['value'] = undefined;
|
||||
|
||||
// Updating `value` directly causes the date input to reset itself or
|
||||
// interfere with user changes.
|
||||
$: updatedValue = value;
|
||||
</script>
|
||||
|
||||
<input
|
||||
{...$$restProps}
|
||||
{value}
|
||||
on:input={(e) => {
|
||||
updatedValue = e.currentTarget.value;
|
||||
|
||||
// Only update when value is not empty to prevent resetting the input
|
||||
if (updatedValue !== '') {
|
||||
value = updatedValue;
|
||||
}
|
||||
}}
|
||||
on:input={(e) => (updatedValue = e.currentTarget.value)}
|
||||
on:blur={() => (value = updatedValue)}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user