mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-30 04:18:28 +08:00
19 lines
438 B
TypeScript
19 lines
438 B
TypeScript
|
import React from 'react';
|
||
|
import { DatePicker } from 'antd';
|
||
|
import dayjs from 'dayjs';
|
||
|
import customParseFormat from 'dayjs/plugin/customParseFormat';
|
||
|
|
||
|
dayjs.extend(customParseFormat);
|
||
|
|
||
|
const dateFormat = 'YYYY-MM-DD';
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<DatePicker
|
||
|
defaultValue={dayjs('2019-09-03', dateFormat)}
|
||
|
minDate={dayjs('2019-08-01', dateFormat)}
|
||
|
maxDate={dayjs('2020-10-31', dateFormat)}
|
||
|
/>
|
||
|
);
|
||
|
|
||
|
export default App;
|