Files
classroomio/src/lib/components/Form/DateTime.svelte
T

25 lines
693 B
Svelte
Raw Normal View History

2023-11-07 08:51:49 +00:00
<script lang="ts">
export let label = '';
export let placeholder = '';
export let value: string | Date = '';
2021-09-23 16:39:38 +03:00
export let className = '';
export let onInput = () => {};
2023-11-07 08:51:49 +00:00
export let isRequired: boolean = false;
2021-09-23 16:39:38 +03:00
</script>
<label class="block {className}">
2023-11-07 08:51:49 +00:00
<span class="text-gray-700 dark:text-white"
>{label}
{#if isRequired}
<span class="text-red-700">*</span>
{/if}
</span>
2021-09-23 16:39:38 +03:00
<input
bind:value
on:input={onInput}
2021-09-23 16:39:38 +03:00
{placeholder}
type="datetime-local"
2023-11-07 08:51:49 +00: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
/>
</label>