This commit is contained in:
afc163 2017-02-17 14:09:27 +08:00
parent 56995e2089
commit 28dbdd17ed
3 changed files with 5 additions and 5 deletions

View File

@ -165,7 +165,7 @@ export default class RangePicker extends React.Component<any, any> {
// default width for showTime
const pickerStyle = {} as any;
if (props.showTime) {
pickerStyle.width = style.width || 300;
pickerStyle.width = (style && style.width) || 300;
}
const clearIcon = (!props.disabled && props.allowClear && value && (value[0] || value[1]))

View File

@ -127,7 +127,7 @@ exports[`test renders ./components/date-picker/demo/disabled-date.md correctly 1
<br />
<span
class="ant-calendar-picker"
style="min-width:300px;">
style="width:300px;">
<span
class="ant-calendar-picker-input ant-input">
<input
@ -255,7 +255,7 @@ exports[`test renders ./components/date-picker/demo/presetted-ranges.md correctl
<br />
<span
class="ant-calendar-picker"
style="min-width:300px;">
style="width:300px;">
<span
class="ant-calendar-picker-input ant-input">
<input
@ -429,7 +429,7 @@ exports[`test renders ./components/date-picker/demo/time.md correctly 1`] = `
<br />
<span
class="ant-calendar-picker"
style="min-width:300px;">
style="width:300px;">
<span
class="ant-calendar-picker-input ant-input">
<input

View File

@ -1184,7 +1184,7 @@ exports[`test renders ./components/form/demo/time-related-controls.md correctly
class="ant-form-item-control ">
<span
class="ant-calendar-picker"
style="min-width:300px;">
style="width:300px;">
<span
class="ant-calendar-picker-input ant-input ant-input-lg">
<input