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
|
|
|
|
2018-12-07 20:02:01 +08:00
|
|
|
const DatePicker = wrapPicker(createPicker(RcCalendar)) as React.ClassicComponentClass<
|
|
|
|
DatePickerProps
|
|
|
|
>;
|
2016-08-19 17:11:06 +08:00
|
|
|
|
2016-10-18 15:20:26 +08:00
|
|
|
const MonthPicker = wrapPicker(createPicker(MonthCalendar), 'YYYY-MM');
|
2016-08-19 17:11:06 +08:00
|
|
|
|
2017-07-03 16:57:11 +08:00
|
|
|
Object.assign(DatePicker, {
|
2017-07-06 23:06:21 +08:00
|
|
|
RangePicker: wrapPicker(RangePicker),
|
2016-08-24 16:56:29 +08:00
|
|
|
MonthPicker,
|
2018-03-01 17:24:06 +08:00
|
|
|
WeekPicker: wrapPicker(WeekPicker, 'gggg-wo'),
|
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;
|