2024-08-03 20:58:07 +01:00
|
|
|
<script lang="ts">
|
2023-12-03 17:38:40 +03:00
|
|
|
export let label = '';
|
|
|
|
|
export let placeholder = '';
|
|
|
|
|
export let value = '';
|
2021-09-23 16:39:38 +03:00
|
|
|
export let className = '';
|
2024-08-03 20:58:07 +01:00
|
|
|
export let onChange = (e?: Event) => {}; // This is to know if element is 'dirty'
|
2021-05-22 12:32:32 +03:00
|
|
|
</script>
|
|
|
|
|
|
2021-09-23 16:39:38 +03:00
|
|
|
<label class="block {className}">
|
2023-10-04 08:18:33 +01:00
|
|
|
<span class="text-gray-700 dark:bg-neutral-800 dark:text-white">{label}</span>
|
2021-05-22 12:32:32 +03:00
|
|
|
<input
|
|
|
|
|
bind:value
|
|
|
|
|
{placeholder}
|
|
|
|
|
type="date"
|
2023-10-04 08:18:33 +01:00
|
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-neutral-800 dark:text-white"
|
2021-09-23 16:39:38 +03:00
|
|
|
on:blur={onChange}
|
2021-05-22 12:32:32 +03:00
|
|
|
/>
|
|
|
|
|
</label>
|