mirror of https://github.com/wg-easy/wg-easy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
665 B
26 lines
665 B
<template>
|
|
<Label :for="id" class="font-semibold md:align-middle md:leading-10">
|
|
{{ label }}
|
|
</Label>
|
|
<input
|
|
:id="id"
|
|
v-model="data"
|
|
:name="id"
|
|
type="date"
|
|
class="rounded-lg border-2 border-gray-100 text-gray-500 focus:border-red-800 focus:outline-0 focus:ring-0 dark:border-neutral-800 dark:bg-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-400"
|
|
/>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
defineProps<{ id: string; label: string }>();
|
|
|
|
const data = defineModel<string | null>({
|
|
set(value) {
|
|
const temp = value?.trim() ?? null;
|
|
if (temp === '') {
|
|
return null;
|
|
}
|
|
return temp;
|
|
},
|
|
});
|
|
</script>
|
|
|