mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-05 23:46:28 +08:00
Fix DatePicker clear not work when showTime
This commit is contained in:
parent
c1bd0098d2
commit
812225ea41
@ -90,7 +90,12 @@ export default React.createClass({
|
||||
};
|
||||
|
||||
if (timePicker) {
|
||||
pickerChangeHandler = {};
|
||||
pickerChangeHandler.onChange = (value) => {
|
||||
// Click clear button
|
||||
if (value === null || value.length === 0) {
|
||||
this.handleChange(value);
|
||||
}
|
||||
};
|
||||
} else {
|
||||
calendarHandler = {};
|
||||
}
|
||||
|
@ -80,7 +80,12 @@ function createPicker(TheCalendar, defaultFormat) {
|
||||
};
|
||||
|
||||
if (this.props.showTime) {
|
||||
pickerChangeHandler = {};
|
||||
pickerChangeHandler.onChange = (value) => {
|
||||
// Click clear button
|
||||
if (value === null) {
|
||||
this.handleChange(value);
|
||||
}
|
||||
};
|
||||
} else {
|
||||
calendarHandler = {};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user