Browse Source

change timepicker options to rctimepicker options

pull/1415/head
qubaoming 9 years ago
parent
commit
fc66d27042
  1. 2
      components/date-picker/demo/time.md
  2. 9
      components/date-picker/wrapPicker.jsx

2
components/date-picker/demo/time.md

@ -13,6 +13,6 @@ function onChange(value) {
}
ReactDOM.render(
<DatePicker showTime={{format:'HH:mm'}} format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间" onChange={onChange} />
<DatePicker showTime format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间" onChange={onChange} />
, mountNode);
````

9
components/date-picker/wrapPicker.jsx

@ -97,9 +97,9 @@ export default function wrapPicker(Picker, defaultFormat) {
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
formatter: new DateTimeFormat(timeFormat || 'HH:mm:ss'),
showSecond: timeFormat && timeFormat.indexOf('ss') >= 0,
showHour: timeFormat && timeFormat.indexOf('HH') >= 0
};
const timePicker = props.showTime ? (
<TimePicker
@ -112,9 +112,6 @@ export default function wrapPicker(Picker, defaultFormat) {
/>
) : null;
console.log(timePicker)
console.log('....')
return (
<Picker
{...this.props}

Loading…
Cancel
Save