feat: migrate DateField and shared date input group

This commit is contained in:
maoyingjie
2026-10-23 23:56:18 +08:00
parent 3c878d2582
commit 01f0776805
63 changed files with 3974 additions and 90 deletions
+34
View File
@@ -0,0 +1,34 @@
<script setup lang="ts">
import {
DateField,
DateFieldGroup,
DateFieldInput,
DateFieldSegment,
Label,
Description,
} from "@heroui-vue/components";
import { today, getLocalTimeZone } from "@internationalized/date";
const todayDate = today(getLocalTimeZone());
</script>
<template>
<div class="flex flex-col gap-4">
<DateField is-disabled :value="todayDate" class="w-[256px]" name="date">
<Label>日期</Label>
<DateFieldGroup>
<DateFieldInput v-slot="{ segment }">
<DateFieldSegment :segment="segment" />
</DateFieldInput>
</DateFieldGroup>
<Description>该日期字段已禁用</Description>
</DateField>
<DateField is-disabled class="w-[256px]" name="date-empty">
<Label>日期</Label>
<DateFieldGroup>
<DateFieldInput v-slot="{ segment }">
<DateFieldSegment :segment="segment" />
</DateFieldInput>
</DateFieldGroup>
<Description>该日期字段已禁用</Description>
</DateField>
</div>
</template>