diff --git a/components/date-picker/index.en-US.md b/components/date-picker/index.en-US.md index 3bd82af1dd..25fd458d16 100644 --- a/components/date-picker/index.en-US.md +++ b/components/date-picker/index.en-US.md @@ -95,7 +95,7 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke | -------- | ----------- | ---- | ------- | | defaultValue | to set default date | [moment](http://momentjs.com/) | - | | defaultPickerValue | to set default picker date | [moment](http://momentjs.com/) | - | -| format | to set the date format, refer to [moment.js](http://momentjs.com/) | string | "YYYY-MM" | +| format | to set the date format. When an array is provided, all values are used for parsing and first value for display. refer to [moment.js](http://momentjs.com/) | string \| string[] | "YYYY-MM" | | monthCellContentRender | Custom month cell content render method | function(date, locale): ReactNode | - | | renderExtraFooter | render extra footer in panel | () => React.ReactNode | - | | value | to set date | [moment](http://momentjs.com/) | - | diff --git a/components/date-picker/index.zh-CN.md b/components/date-picker/index.zh-CN.md index d133209638..d12884ee75 100644 --- a/components/date-picker/index.zh-CN.md +++ b/components/date-picker/index.zh-CN.md @@ -80,7 +80,7 @@ moment.locale('zh-cn'); | defaultValue | 默认日期 | [moment](http://momentjs.com/) | 无 | | defaultPickerValue | 默认面板日期 | [moment](http://momentjs.com/) | 无 | | disabledTime | 不可选择的时间 | function(date) | 无 | -| format | 展示的日期格式,配置参考 [moment.js](http://momentjs.com/) | string | "YYYY-MM-DD" | +| format | 设置日期格式,为数组时支持多格式匹配,展示以第一个为准。配置参考 [moment.js](http://momentjs.com/) | string \| string[] | "YYYY-MM-DD" | | mode | 日期面板的状态 | `time|date|month|year` | 'date' | | renderExtraFooter | 在面板中添加额外的页脚 | () => React.ReactNode | - | | showTime | 增加时间选择功能 | Object\|boolean | [TimePicker Options](/components/time-picker/#API) | diff --git a/components/date-picker/interface.tsx b/components/date-picker/interface.tsx index caedc900b8..004632edb8 100644 --- a/components/date-picker/interface.tsx +++ b/components/date-picker/interface.tsx @@ -6,7 +6,7 @@ export interface PickerProps { id?: number | string; prefixCls?: string; inputPrefixCls?: string; - format?: string; + format?: string | string[]; disabled?: boolean; allowClear?: boolean; className?: string; diff --git a/package.json b/package.json index f23345a54c..ea24524b96 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "prop-types": "^15.6.2", "raf": "^3.4.0", "rc-animate": "^2.5.4", - "rc-calendar": "~9.7.9", + "rc-calendar": "~9.8.0", "rc-cascader": "~0.16.0", "rc-checkbox": "~2.1.5", "rc-collapse": "~1.10.0",