Browse Source

docs: update locale format (#4150)

pull/4151/head
Benjy Cui 8 years ago
committed by Wei Zhu
parent
commit
904be38493
  1. 2
      components/calendar/index.en-US.md
  2. 2
      components/calendar/index.zh-CN.md
  3. 2
      components/date-picker/index.en-US.md
  4. 2
      components/date-picker/index.zh-CN.md
  5. 38
      components/date-picker/locale/example.json

2
components/calendar/index.en-US.md

@ -29,5 +29,5 @@ When data is in the form of date, such as schedule, timetable, prices calendar,
| fullscreen | to set whether full-screen display | boolean | true |
| dateCellRender | to set the way of renderer the date cell | function(date: moment): ReactNode | - |
| monthCellRender | to set the way of renderer the month cell | function(date: moment): ReactNode | - |
| locale | set locale | Object | [default](https://github.com/ant-design/ant-design/issues/424) |
| locale | set locale | Object | [default](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) |
| onPanelChange| the callback when panel change | function(date: moment, mode: string) | - |

2
components/calendar/index.zh-CN.md

@ -31,5 +31,5 @@ title: Calendar
| fullscreen | 是否全屏显示 | boolean | true |
| dateCellRender | 自定义渲染日期单元格| function(date: moment): ReactNode | 无 |
| monthCellRender | 自定义渲染月单元格 | function(date: moment): ReactNode | 无 |
| locale | 国际化配置 | Object | [默认配置](https://github.com/ant-design/ant-design/issues/424) |
| locale | 国际化配置 | Object | [默认配置](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) |
| onPanelChange| 日期面板变化回调 | function(date: moment, mode: string) | 无 |

2
components/date-picker/index.en-US.md

@ -41,7 +41,7 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker.
| style | to customize the style of the input box | Object | {} |
| popupStyle | to customize the style of the popup calendar | Object | {} |
| size | determine the size of the input box, the height of `large` and `small`, are 32px and 22px respectively, while default size is 28px | String | - |
| locale | localization configuration | Object | [default](https://github.com/ant-design/ant-design/issues/424) |
| locale | localization configuration | Object | [default](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) |
| disabledDate | to specify the date that cannot be selected | function | - |
| getCalendarContainer | to set the container of the floating layer, while the default is to create a `div` element in `body` | function(trigger) | - |
| open | open state of picker | bool | - |

2
components/date-picker/index.zh-CN.md

@ -42,7 +42,7 @@ moment.locale('zh-cn');
| style | 自定义输入框样式 | object | {} |
| popupStyle | 格外的弹出日历样式 | object | {} |
| size | 输入框大小,`large` 高度为 32px,`small` 为 22px,默认是 28px | string | 无 |
| locale | 国际化配置 | object | [默认配置](https://github.com/ant-design/ant-design/issues/424) |
| locale | 国际化配置 | object | [默认配置](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) |
| disabledDate | 不可选择的日期 | function | 无 |
| getCalendarContainer | 定义浮层的容器,默认为 body 上新建 div | function(trigger) | 无 |
| open | 控制弹层是否展开 | bool | - |

38
components/date-picker/locale/example.json

@ -0,0 +1,38 @@
{
"lang": {
"placeholder": "Select date",
"rangePlaceholder": [
"Start date",
"End date"
],
"today": "Today",
"now": "Now",
"backToToday": "Back to today",
"ok": "Ok",
"clear": "Clear",
"month": "Month",
"year": "Year",
"timeSelect": "Select time",
"dateSelect": "Select date",
"monthSelect": "Choose a month",
"yearSelect": "Choose a year",
"decadeSelect": "Choose a decade",
"yearFormat": "YYYY",
"dateFormat": "M/D/YYYY",
"dayFormat": "D",
"dateTimeFormat": "M/D/YYYY HH:mm:ss",
"monthFormat": "MMMM",
"monthBeforeYear": true,
"previousMonth": "Previous month (PageUp)",
"nextMonth": "Next month (PageDown)",
"previousYear": "Last year (Control + left)",
"nextYear": "Next year (Control + right)",
"previousDecade": "Last decade",
"nextDecade": "Next decade",
"previousCentury": "Last century",
"nextCentury": "Next century"
},
"timePickerLocale": {
"placeholder": "Select time"
}
}
Loading…
Cancel
Save