import React from 'react'; import type { FormProps } from 'antd'; import { Button, DatePicker, Form } from 'antd'; import dayjs from 'dayjs'; const dateTimestamp = dayjs('2024-01-01').valueOf(); type FieldType = { date?: string; }; const onFinish: FormProps['onFinish'] = (values) => { console.log('Success:', values); }; const App: React.FC = () => (
label="Date" name="date" rules={[{ required: true }]} getValueProps={(value) => ({ value: value && dayjs(Number(value)) })} normalize={(value) => value && `${dayjs(value).valueOf()}`} > ); export default App;