mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-26 12:10:06 +08:00
Merge branch 'develop-1.0.0' of https://github.com/freestyle21/ant-design into freestyle21-develop-1.0.0
This commit is contained in:
commit
7fffcffdb2
@ -34,9 +34,9 @@ english: DatePicker
|
||||
| popupStyle | 格外的弹出日历样式 | object | {} |
|
||||
| size | 输入框大小,`large` 高度为 32px,`small` 为 22px,默认是 28px | string | 无 |
|
||||
| locale | 国际化配置 | object | [默认配置](https://github.com/ant-design/ant-design/issues/424) |
|
||||
| showTime | 增加时间选择功能 | bool | false |
|
||||
| onOk | 点击确定按钮的回调 | function(Date value) | 无 |
|
||||
| getCalendarContainer | 定义浮层的容器,默认为 body 上新建 div | function(trigger) | 无 |
|
||||
| showTime | 增加时间选择功能 | object | [TimePicker Options](http://ant.design/components/time-picker/#api) |
|
||||
|
||||
### MonthPicker
|
||||
|
||||
|
@ -94,12 +94,22 @@ export default function wrapPicker(Picker, defaultFormat) {
|
||||
});
|
||||
|
||||
const locale = this.getLocale();
|
||||
|
||||
const timeFormat = props.showTime && props.showTime.format;
|
||||
const rcTimePickerProps = {
|
||||
formatter: new DateTimeFormat(timeFormat || 'HH:mm:ss'),
|
||||
showSecond: timeFormat && timeFormat.indexOf('ss') >= 0,
|
||||
showHour: timeFormat && timeFormat.indexOf('HH') >= 0
|
||||
};
|
||||
const timePicker = props.showTime ? (
|
||||
<TimePicker
|
||||
{...props.showTime}
|
||||
{...rcTimePickerProps}
|
||||
prefixCls="ant-time-picker"
|
||||
placeholder={locale.timePickerLocale.placeholder}
|
||||
locale={locale.timePickerLocale}
|
||||
transitionName="slide-up" />
|
||||
transitionName="slide-up"
|
||||
/>
|
||||
) : null;
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user