diff --git a/components/date-picker/RangePicker.jsx b/components/date-picker/RangePicker.jsx index 19fb22432c..2c433ac2f1 100644 --- a/components/date-picker/RangePicker.jsx +++ b/components/date-picker/RangePicker.jsx @@ -50,9 +50,7 @@ export default React.createClass({ }, handleChange(value) { if (!('value' in this.props)) { - this.setState({ - value - }); + this.setState({ value }); } const startTime = value[0] ? new Date(value[0].getTime()) : null; const endTime = value[1] ? new Date(value[1].getTime()) : null; @@ -107,7 +105,6 @@ export default React.createClass({ locale={locale.lang} onOk={onOk} defaultValue={[defaultCalendarValue, defaultCalendarValue]} - showClear {...calendarHandler} /> ); diff --git a/components/date-picker/index.jsx b/components/date-picker/index.jsx index 43cf9e6204..8c2d635eaf 100644 --- a/components/date-picker/index.jsx +++ b/components/date-picker/index.jsx @@ -24,7 +24,7 @@ function createPicker(TheCalendar, defaultFormat) { align: { offset: [0, -9], }, - open: false + open: false, }; }, getInitialState() { @@ -42,9 +42,7 @@ function createPicker(TheCalendar, defaultFormat) { }, handleChange(value) { if (!('value' in this.props)) { - this.setState({ - value, - }); + this.setState({ value }); } const timeValue = value ? new Date(value.getTime()) : null; this.props.onChange(timeValue); @@ -97,8 +95,7 @@ function createPicker(TheCalendar, defaultFormat) { dateInputPlaceholder={placeholder} prefixCls="ant-calendar" className={calendarClassName} - {...calendarHandler} - showClear/> + {...calendarHandler} /> ); let sizeClass = '';