diff --git a/components/date-picker/demo/time.md b/components/date-picker/demo/time.md index 81de2d224c..e7de19c240 100644 --- a/components/date-picker/demo/time.md +++ b/components/date-picker/demo/time.md @@ -14,6 +14,6 @@ function onChange(value) { } ReactDOM.render( - + , mountNode); ```` diff --git a/components/date-picker/index.jsx b/components/date-picker/index.jsx index b6dd9fb69a..9c45da4898 100644 --- a/components/date-picker/index.jsx +++ b/components/date-picker/index.jsx @@ -114,8 +114,15 @@ function createPicker(TheCalendar, defaultFormat) { if (this.state.open) { pickerClass += ' ant-calendar-picker-open'; } + + // default width for showTime + const pickerStyle = {}; + if (this.props.showTime) { + pickerStyle.width = 180; + } + return ( - +