Browse Source

datePicker support string[] format

close #13148
pull/13383/head
zombiej 6 years ago
parent
commit
62810dbde6
  1. 2
      components/date-picker/index.en-US.md
  2. 2
      components/date-picker/index.zh-CN.md
  3. 2
      components/date-picker/interface.tsx
  4. 2
      package.json

2
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/) | - |

2
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) |

2
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;

2
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",

Loading…
Cancel
Save