Skip to content

Commit

Permalink
demo(time-picker): add default value for range picker case
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanlao11 committed Oct 29, 2024
1 parent f0c39c6 commit cbb426b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/time-picker/demo/range-picker.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import React from 'react';
import { TimePicker } from 'antd';
import dayjs from 'dayjs';

const App: React.FC = () => <TimePicker.RangePicker />;
const App: React.FC = () => {
const startTime = dayjs('09:10:20', 'HH:mm:ss');
const endTime = dayjs('10:20:30', 'HH:mm:ss');

return <TimePicker.RangePicker defaultValue={[startTime, endTime]} format="HH:mm:ss" />;
};

export default App;

0 comments on commit cbb426b

Please sign in to comment.