ant-design-vue/components/date-picker/index.js

20 lines
767 B
JavaScript
Raw Normal View History

2018-03-15 13:40:34 +00:00
import VcCalendar from '../vc-calendar'
import MonthCalendar from '../vc-calendar/src/MonthCalendar'
import createPicker from './createPicker'
import wrapPicker from './wrapPicker'
import RangePicker from './RangePicker'
import WeekPicker from './WeekPicker'
2018-03-16 03:19:02 +00:00
import { DatePickerProps, MonthPickerProps, WeexPickerProps, RangePickerProps } from './interface'
2018-03-15 13:40:34 +00:00
2018-03-17 13:38:29 +00:00
const DatePicker = wrapPicker(createPicker(VcCalendar, DatePickerProps()), DatePickerProps())
2018-03-15 13:40:34 +00:00
2018-03-17 13:38:29 +00:00
const MonthPicker = wrapPicker(createPicker(MonthCalendar, MonthPickerProps()), MonthPickerProps(), 'YYYY-MM')
2018-03-15 13:40:34 +00:00
Object.assign(DatePicker, {
2018-03-16 03:19:02 +00:00
RangePicker: wrapPicker(RangePicker, RangePickerProps()),
2018-03-15 13:40:34 +00:00
MonthPicker,
2018-03-16 03:19:02 +00:00
WeekPicker: wrapPicker(WeekPicker, WeexPickerProps(), 'YYYY-wo'),
2018-03-15 13:40:34 +00:00
})
export default DatePicker