feat: migrate DateField and shared date input group
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
Label,
|
||||
} from "@heroui-vue/components";
|
||||
</script>
|
||||
<template>
|
||||
<DateField class="w-[256px]" name="date">
|
||||
<Label>日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
</DateField>
|
||||
</template>
|
||||
@@ -0,0 +1,38 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
Label,
|
||||
Description,
|
||||
Button,
|
||||
} from "@heroui-vue/components";
|
||||
import { shallowRef } from "vue";
|
||||
import {
|
||||
today,
|
||||
getLocalTimeZone,
|
||||
type DateValue,
|
||||
} from "@internationalized/date";
|
||||
const value = shallowRef<DateValue | null>(null);
|
||||
const todayDate = today(getLocalTimeZone());
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex flex-col gap-4">
|
||||
<DateField v-model="value" class="w-[256px]" name="date">
|
||||
<Label>日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
<Description>
|
||||
当前值:{{ value ? value.toString() : "(空)" }}
|
||||
</Description>
|
||||
</DateField>
|
||||
<div class="flex gap-2">
|
||||
<Button variant="tertiary" @click="value = todayDate">设为今天</Button>
|
||||
<Button variant="tertiary" @click="value = null">清空</Button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
Label,
|
||||
} from "@heroui-vue/components";
|
||||
</script>
|
||||
<template>
|
||||
<DateField class="w-64" name="due-date">
|
||||
<Label>截止日期</Label>
|
||||
<DateFieldGroup
|
||||
variant="secondary"
|
||||
class="rounded-xl border border-border/80 bg-default shadow-sm"
|
||||
>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
</DateField>
|
||||
</template>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,70 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
DateFieldPrefix,
|
||||
Label,
|
||||
Description,
|
||||
FieldError,
|
||||
Form,
|
||||
Button,
|
||||
} from "@heroui-vue/components";
|
||||
import { IconCalendar } from "@tabler/icons-vue";
|
||||
import { shallowRef, computed, onBeforeUnmount } from "vue";
|
||||
import {
|
||||
today,
|
||||
getLocalTimeZone,
|
||||
type DateValue,
|
||||
} from "@internationalized/date";
|
||||
const value = shallowRef<DateValue | null>(null);
|
||||
const todayDate = today(getLocalTimeZone());
|
||||
const isInvalid = computed(
|
||||
() => value.value !== null && value.value.compare(todayDate) < 0,
|
||||
);
|
||||
const isSubmitting = shallowRef(false);
|
||||
let timer: ReturnType<typeof setTimeout> | undefined;
|
||||
function submit() {
|
||||
if (!value.value || isInvalid.value || isSubmitting.value) return;
|
||||
isSubmitting.value = true;
|
||||
timer = setTimeout(() => {
|
||||
value.value = null;
|
||||
isSubmitting.value = false;
|
||||
}, 1500);
|
||||
}
|
||||
onBeforeUnmount(() => clearTimeout(timer));
|
||||
</script>
|
||||
<template>
|
||||
<Form class="flex w-[280px] flex-col gap-4" @submit.prevent="submit">
|
||||
<DateField
|
||||
v-model="value"
|
||||
is-required
|
||||
:is-invalid="isInvalid"
|
||||
:min-value="todayDate"
|
||||
class="w-full"
|
||||
name="date"
|
||||
>
|
||||
<Label>预约日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldPrefix>
|
||||
<IconCalendar class="size-4 text-muted" />
|
||||
</DateFieldPrefix>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
<FieldError v-if="isInvalid">日期须为今天或将来</FieldError>
|
||||
<Description v-else>输入日期 from today onwards</Description>
|
||||
</DateField>
|
||||
<Button
|
||||
class="w-full"
|
||||
:is-disabled="!value || isInvalid"
|
||||
:is-pending="isSubmitting"
|
||||
type="submit"
|
||||
variant="primary"
|
||||
>
|
||||
{{ isSubmitting ? "提交中…" : "Submit" }}
|
||||
</Button>
|
||||
</Form>
|
||||
</template>
|
||||
@@ -0,0 +1,38 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
DateFieldPrefix,
|
||||
DateFieldSuffix,
|
||||
Label,
|
||||
} from "@heroui-vue/components";
|
||||
import { IconCalendar, IconChevronDown } from "@tabler/icons-vue";
|
||||
</script>
|
||||
<template>
|
||||
<div class="w-[400px] max-w-full space-y-4">
|
||||
<DateField full-width name="date">
|
||||
<Label>日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
</DateField>
|
||||
<DateField full-width name="date-icons">
|
||||
<Label>日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldPrefix>
|
||||
<IconCalendar class="size-4 text-muted" />
|
||||
</DateFieldPrefix>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
<DateFieldSuffix>
|
||||
<IconChevronDown class="size-4 text-muted" />
|
||||
</DateFieldSuffix>
|
||||
</DateFieldGroup>
|
||||
</DateField>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,98 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
Label,
|
||||
Select,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
SelectIndicator,
|
||||
SelectPopover,
|
||||
ListBox,
|
||||
ListBoxItem,
|
||||
ListBoxItemIndicator,
|
||||
Tooltip,
|
||||
TooltipTrigger,
|
||||
TooltipContent,
|
||||
} from "@heroui-vue/components";
|
||||
import { computed, ref } from "vue";
|
||||
import { IconHelpCircle } from "@tabler/icons-vue";
|
||||
import { parseDate, parseZonedDateTime } from "@internationalized/date";
|
||||
type Granularity = "day" | "hour" | "minute" | "second";
|
||||
const options = [
|
||||
{ id: "day", label: "日" },
|
||||
{ id: "hour", label: "时" },
|
||||
{ id: "minute", label: "分" },
|
||||
{ id: "second", label: "秒" },
|
||||
] as const;
|
||||
const granularity = ref<Granularity>("day");
|
||||
function setGranularity(value: unknown) {
|
||||
if (options.some((option) => option.id === value))
|
||||
granularity.value = value as Granularity;
|
||||
}
|
||||
const defaultValue = computed(() =>
|
||||
granularity.value === "day"
|
||||
? parseDate("2025-02-03")
|
||||
: parseZonedDateTime("2025-02-03T08:45:00[America/Los_Angeles]"),
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex flex-wrap gap-4">
|
||||
<DateField
|
||||
:key="granularity"
|
||||
class="w-[256px]"
|
||||
:default-value="defaultValue"
|
||||
:granularity="granularity"
|
||||
name="granularity-date"
|
||||
>
|
||||
<Label>预约日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
</DateField>
|
||||
<div class="flex flex-col gap-1">
|
||||
<div class="flex items-center gap-2">
|
||||
<Label>粒度</Label>
|
||||
<Tooltip :delay="0">
|
||||
<TooltipTrigger aria-label="粒度说明">
|
||||
<IconHelpCircle class="size-4 text-muted" />
|
||||
</TooltipTrigger>
|
||||
<TooltipContent placement="bottom start">
|
||||
<p>
|
||||
决定日期选择器显示的最小单位。默认情况下,日期为「日」,时间为「分」。
|
||||
</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</div>
|
||||
<Select
|
||||
class="w-[110px]"
|
||||
:model-value="granularity"
|
||||
placeholder="选择粒度"
|
||||
variant="secondary"
|
||||
@update:model-value="setGranularity"
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
<SelectIndicator />
|
||||
</SelectTrigger>
|
||||
<SelectPopover>
|
||||
<ListBox>
|
||||
<ListBoxItem
|
||||
v-for="option in options"
|
||||
:id="option.id"
|
||||
:key="option.id"
|
||||
:text-value="option.label"
|
||||
>
|
||||
{{ option.label }}
|
||||
<ListBoxItemIndicator />
|
||||
</ListBoxItem>
|
||||
</ListBox>
|
||||
</SelectPopover>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,32 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
Label,
|
||||
FieldError,
|
||||
} from "@heroui-vue/components";
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex flex-col gap-4">
|
||||
<DateField is-invalid is-required class="w-[256px]" name="date">
|
||||
<Label>日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
<FieldError>请输入有效日期</FieldError>
|
||||
</DateField>
|
||||
<DateField is-invalid class="w-[256px]" name="invalid-date">
|
||||
<Label>日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
<FieldError>日期须为将来</FieldError>
|
||||
</DateField>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,38 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
DateFieldPrefix,
|
||||
Label,
|
||||
Description,
|
||||
Surface,
|
||||
} from "@heroui-vue/components";
|
||||
import { IconCalendar } from "@tabler/icons-vue";
|
||||
</script>
|
||||
<template>
|
||||
<Surface class="flex w-full max-w-sm flex-col gap-4 rounded-3xl p-6">
|
||||
<DateField class="w-full" name="date">
|
||||
<Label>日期</Label>
|
||||
<DateFieldGroup variant="secondary">
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
<Description>输入日期</Description>
|
||||
</DateField>
|
||||
<DateField class="w-full" name="date-2">
|
||||
<Label>预约日期</Label>
|
||||
<DateFieldGroup variant="secondary">
|
||||
<DateFieldPrefix>
|
||||
<IconCalendar class="size-4 text-muted" />
|
||||
</DateFieldPrefix>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
<Description>输入预约日期</Description>
|
||||
</DateField>
|
||||
</Surface>
|
||||
</template>
|
||||
@@ -0,0 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
Label,
|
||||
} from "@heroui-vue/components";
|
||||
</script>
|
||||
<template>
|
||||
<DateField class="w-[256px]" as="div" data-custom="date-field" name="date">
|
||||
<Label data-custom="date-field-label">日期</Label>
|
||||
<DateFieldGroup as="div" data-custom="date-field-group">
|
||||
<DateFieldInput
|
||||
as="div"
|
||||
data-custom="date-field-input"
|
||||
v-slot="{ segment }"
|
||||
>
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
</DateField>
|
||||
</template>
|
||||
@@ -0,0 +1,31 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
Label,
|
||||
Description,
|
||||
} from "@heroui-vue/components";
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex flex-col gap-4">
|
||||
<DateField is-required class="w-[256px]" name="date">
|
||||
<Label>日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
</DateField>
|
||||
<DateField is-required class="w-[256px]" name="start-date">
|
||||
<Label>开始日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
<Description>必填项</Description>
|
||||
</DateField>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,29 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
Label,
|
||||
} from "@heroui-vue/components";
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex flex-col gap-4">
|
||||
<DateField class="w-[256px]" name="primary-date">
|
||||
<Label>主要变体</Label>
|
||||
<DateFieldGroup variant="primary">
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
</DateField>
|
||||
<DateField class="w-[256px]" name="secondary-date">
|
||||
<Label>次要变体</Label>
|
||||
<DateFieldGroup variant="secondary">
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
</DateField>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,32 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
Label,
|
||||
Description,
|
||||
} from "@heroui-vue/components";
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex flex-col gap-4">
|
||||
<DateField class="w-[256px]" name="date">
|
||||
<Label>出生日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
<Description>输入出生日期</Description>
|
||||
</DateField>
|
||||
<DateField class="w-[256px]" name="appointment-date">
|
||||
<Label>预约日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
<Description>输入预约日期</Description>
|
||||
</DateField>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,30 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
DateFieldPrefix,
|
||||
DateFieldSuffix,
|
||||
Label,
|
||||
Description,
|
||||
} from "@heroui-vue/components";
|
||||
import { IconCalendar, IconChevronDown } from "@tabler/icons-vue";
|
||||
</script>
|
||||
<template>
|
||||
<DateField class="w-[256px]" name="date">
|
||||
<Label>日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldPrefix>
|
||||
<IconCalendar class="size-4 text-muted" />
|
||||
</DateFieldPrefix>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
<DateFieldSuffix>
|
||||
<IconChevronDown class="size-4 text-muted" />
|
||||
</DateFieldSuffix>
|
||||
</DateFieldGroup>
|
||||
<Description>输入日期</Description>
|
||||
</DateField>
|
||||
</template>
|
||||
@@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
DateFieldPrefix,
|
||||
Label,
|
||||
} from "@heroui-vue/components";
|
||||
import { IconCalendar } from "@tabler/icons-vue";
|
||||
</script>
|
||||
<template>
|
||||
<DateField class="w-[256px]" name="date">
|
||||
<Label>日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldPrefix>
|
||||
<IconCalendar class="size-4 text-muted" />
|
||||
</DateFieldPrefix>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
</DateField>
|
||||
</template>
|
||||
@@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
DateFieldSuffix,
|
||||
Label,
|
||||
} from "@heroui-vue/components";
|
||||
import { IconCalendar } from "@tabler/icons-vue";
|
||||
</script>
|
||||
<template>
|
||||
<DateField class="w-[256px]" name="date">
|
||||
<Label>日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
<DateFieldSuffix>
|
||||
<IconCalendar class="size-4 text-muted" />
|
||||
</DateFieldSuffix>
|
||||
</DateFieldGroup>
|
||||
</DateField>
|
||||
</template>
|
||||
@@ -0,0 +1,43 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
Label,
|
||||
Description,
|
||||
FieldError,
|
||||
} from "@heroui-vue/components";
|
||||
import { shallowRef, computed } from "vue";
|
||||
import {
|
||||
today,
|
||||
getLocalTimeZone,
|
||||
type DateValue,
|
||||
} from "@internationalized/date";
|
||||
const value = shallowRef<DateValue | null>(null);
|
||||
const todayDate = today(getLocalTimeZone());
|
||||
const isInvalid = computed(
|
||||
() => value.value !== null && value.value.compare(todayDate) < 0,
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex flex-col gap-4">
|
||||
<DateField
|
||||
v-model="value"
|
||||
is-required
|
||||
:is-invalid="isInvalid"
|
||||
:min-value="todayDate"
|
||||
class="w-[256px]"
|
||||
name="date"
|
||||
>
|
||||
<Label>日期</Label>
|
||||
<DateFieldGroup>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
<FieldError v-if="isInvalid">日期须为今天或将来</FieldError>
|
||||
<Description v-else>输入日期 from today onwards</Description>
|
||||
</DateField>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user