ant-design/components/date-picker/demo/multiple-debug.tsx
希亚的西红柿 5716831849
fix: DatePicker with multiple support placeholder (#48387)
* feat: add placeholder option for multiple datepicker

* fix: update style

* chore: bump rc-picker

* test: update snapshot

---------

Co-authored-by: afc163 <afc163@gmail.com>
Co-authored-by: 二货机器人 <smith3816@gmail.com>
2024-04-16 14:54:19 +08:00

17 lines
535 B
TypeScript

import React from 'react';
import { DatePicker, Flex } from 'antd';
import dayjs from 'dayjs';
const defaultValue = new Array(10).fill(0).map((_, index) => dayjs('2000-01-01').add(index, 'day'));
const App: React.FC = () => (
<Flex vertical gap="small">
<DatePicker multiple placeholder="Bamboo" />
<DatePicker multiple defaultValue={defaultValue} size="small" />
<DatePicker multiple defaultValue={defaultValue} />
<DatePicker multiple defaultValue={defaultValue} size="large" />
</Flex>
);
export default App;