Skip to content

Commit

Permalink
chore: fix datepicker demo (#3050)
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn authored Aug 20, 2024
1 parent b21f49e commit f5b208c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/date-picker/_example/date-presets-alt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import type { DateRangeValue, DateRangePickerProps } from 'tdesign-react';

export default function YearDatePicker() {
const [presets] = useState<DateRangePickerProps['presets']>({
最近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<DateRangeValue>(['2022-01-01', '2022-08-08']);
Expand Down

0 comments on commit f5b208c

Please sign in to comment.