Browse Source

rm onSelect

pull/746/head
afc163 9 years ago
parent
commit
2ea1fb48a4
  1. 8
      components/date-picker/index.jsx

8
components/date-picker/index.jsx

@ -16,7 +16,6 @@ function createPicker(TheCalendar, defaultFormat) {
format: defaultFormat || 'yyyy-MM-dd',
transitionName: 'slide-up',
popupStyle: {},
onSelect: null, //
onChange() {
}, // onChange Validator
locale: {},
@ -44,13 +43,6 @@ function createPicker(TheCalendar, defaultFormat) {
this.setState({ value });
}
const timeValue = value ? new Date(value.getTime()) : null;
// onSelect .
if (this.props.onSelect) {
require('util-deprecate')(
this.props.onSelect,
'onSelect property of Datepicker is deprecated, use onChange instead'
)(timeValue);
}
this.props.onChange(timeValue);
},
render() {

Loading…
Cancel
Save