Allow showHour can be overrided

This commit is contained in:
afc163 2017-05-16 15:33:01 +08:00
parent 523ad8c802
commit 8feed523d9

View File

@ -120,15 +120,15 @@ abstract class TimePicker extends React.Component<TimePickerProps, any> {
return ( return (
<RcTimePicker <RcTimePicker
showHour={format.indexOf('HH') > -1 || format.indexOf('h') > -1}
showMinute={format.indexOf('mm') > -1}
showSecond={format.indexOf('ss') > -1}
{...props} {...props}
ref={this.saveTimePicker} ref={this.saveTimePicker}
format={format} format={format}
className={className} className={className}
value={this.state.value} value={this.state.value}
placeholder={props.placeholder === undefined ? this.getLocale().placeholder : props.placeholder} placeholder={props.placeholder === undefined ? this.getLocale().placeholder : props.placeholder}
showHour={format.indexOf('HH') > -1 || format.indexOf('h') > -1}
showMinute={format.indexOf('mm') > -1}
showSecond={format.indexOf('ss') > -1}
onChange={this.handleChange} onChange={this.handleChange}
onOpen={this.handleOpenClose} onOpen={this.handleOpenClose}
onClose={this.handleOpenClose} onClose={this.handleOpenClose}