Fix WeekPicker style, close #11738

This commit is contained in:
afc163 2018-08-22 00:41:29 +08:00
parent 611c127f6b
commit c9901acb7f
2 changed files with 7 additions and 4 deletions

View File

@ -87,7 +87,7 @@ class WeekPicker extends React.Component<any, any> {
const {
prefixCls, className, disabled, pickerClass, popupStyle,
pickerInputClass, format, allowClear, locale, localeCode, disabledDate,
style, onFocus, onBlur,
style, onFocus, onBlur, id,
} = this.props;
const pickerValue = this.state.value;
@ -129,7 +129,6 @@ class WeekPicker extends React.Component<any, any> {
className={pickerInputClass}
onFocus={onFocus}
onBlur={onBlur}
style={style}
/>
{clearIcon}
<span className={`${prefixCls}-picker-icon`} />
@ -137,7 +136,11 @@ class WeekPicker extends React.Component<any, any> {
);
};
return (
<span className={classNames(className, pickerClass)} id={this.props.id}>
<span
className={classNames(className, pickerClass)}
style={style}
id={id}
>
<RcDatePicker
{...this.props}
calendar={calendar}

View File

@ -3,13 +3,13 @@
exports[`WeekPicker should support style prop 1`] = `
<span
class="ant-calendar-picker"
style="width: 400px;"
>
<span>
<input
class="ant-calendar-picker-input ant-input"
placeholder="Select date"
readonly=""
style="width: 400px;"
value=""
/>
<span