2017-11-17 14:38:54 +08:00
|
|
|
import * as React from 'react';
|
2016-03-21 21:16:38 +08:00
|
|
|
import RcCalendar from 'rc-calendar';
|
2015-10-20 16:47:55 +08:00
|
|
|
import MonthCalendar from 'rc-calendar/lib/MonthCalendar';
|
2016-03-30 09:50:44 +08:00
|
|
|
import createPicker from './createPicker';
|
2016-03-30 10:52:15 +08:00
|
|
|
import wrapPicker from './wrapPicker';
|
2016-03-21 21:16:38 +08:00
|
|
|
import RangePicker from './RangePicker';
|
2017-08-31 20:44:22 +08:00
|
|
|
import WeekPicker from './WeekPicker';
|
2018-01-19 19:06:19 +08:00
|
|
|
import { DatePickerProps, DatePickerDecorator } from './interface';
|
2015-08-25 17:27:38 +08:00
|
|
|
|
2019-01-15 16:58:40 +08:00
|
|
|
const DatePicker = wrapPicker(createPicker(RcCalendar), 'date') as React.ClassicComponentClass<
|
2018-12-07 20:02:01 +08:00
|
|
|
DatePickerProps
|
|
|
|
>;
|
2016-08-19 17:11:06 +08:00
|
|
|
|
2019-01-15 16:58:40 +08:00
|
|
|
const MonthPicker = wrapPicker(createPicker(MonthCalendar), 'month');
|
2016-08-19 17:11:06 +08:00
|
|
|
|
2017-07-03 16:57:11 +08:00
|
|
|
Object.assign(DatePicker, {
|
2019-01-15 16:58:40 +08:00
|
|
|
RangePicker: wrapPicker(RangePicker, 'date'),
|
2016-08-24 16:56:29 +08:00
|
|
|
MonthPicker,
|
2019-01-15 16:58:40 +08:00
|
|
|
WeekPicker: wrapPicker(WeekPicker, 'week'),
|
2016-08-24 16:56:29 +08:00
|
|
|
});
|
2015-08-24 14:30:08 +08:00
|
|
|
|
2016-10-18 15:20:26 +08:00
|
|
|
export default DatePicker as DatePickerDecorator;
|