From f5b208ca4245ab89c95b623b60766b0ab247278f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?w=C5=AB=20y=C4=81ng?= Date: Tue, 20 Aug 2024 16:44:52 +0800 Subject: [PATCH] chore: fix datepicker demo (#3050) --- src/date-picker/_example/date-presets-alt.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/date-picker/_example/date-presets-alt.tsx b/src/date-picker/_example/date-presets-alt.tsx index b10df4e83e..6a5553fda5 100644 --- a/src/date-picker/_example/date-presets-alt.tsx +++ b/src/date-picker/_example/date-presets-alt.tsx @@ -5,9 +5,9 @@ import type { DateRangeValue, DateRangePickerProps } from 'tdesign-react'; export default function YearDatePicker() { const [presets] = useState({ - 最近7天: [dayjs().subtract(6, 'day').toString(), dayjs().toString()], - 最近3天: [dayjs().subtract(2, 'day').toString(), dayjs().toString()], - 今天: [dayjs().toString(), dayjs().toString()], + 最近7天: [dayjs().subtract(6, 'day').toDate(), dayjs().toDate()], + 最近3天: [dayjs().subtract(2, 'day').toDate(), dayjs().toDate()], + 今天: [dayjs().toDate(), dayjs().toDate()], }); const [range1, setRange1] = useState(['2022-01-01', '2022-08-08']);