update code style

This commit is contained in:
afc163 2016-02-19 17:07:26 +08:00
parent 2ec38b1072
commit c1bd0098d2
2 changed files with 4 additions and 10 deletions

View File

@ -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}
/>
);

View File

@ -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 = '';