sveltestrap icon indicating copy to clipboard operation
sveltestrap copied to clipboard

Input date with max attribute keyboard issue

Open StagnantIce opened this issue 1 year ago • 2 comments

{...$$restProps} clear year in date field, if you try write it in field by keyboard.

<script>
	import Input from './Input.svelte';

	const day18YearsAgo = new Date();
	let data = '';
</script>

            <Input
                type="date"
                bind:value={data}
                max={day18YearsAgo.toISOString().slice(0, 10)}
            />

Actual result: You can't write year by keyabord

Expected result You can write year by keyboard

StagnantIce avatar Jan 07 '24 09:01 StagnantIce

If make max property - we can avoid this behavior.

StagnantIce avatar Jan 07 '24 09:01 StagnantIce

Review please https://github.com/bestguy/sveltestrap/pull/586/files

StagnantIce avatar Jan 07 '24 09:01 StagnantIce