sveltestrap
sveltestrap copied to clipboard
Input date with max attribute keyboard issue
{...$$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
If make max property - we can avoid this behavior.
Review please https://github.com/bestguy/sveltestrap/pull/586/files