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', format: defaultFormat || 'yyyy-MM-dd',
transitionName: 'slide-up', transitionName: 'slide-up',
popupStyle: {}, popupStyle: {},
onSelect: null, //
onChange() { onChange() {
}, // onChange Validator }, // onChange Validator
locale: {}, locale: {},
@ -44,13 +43,6 @@ function createPicker(TheCalendar, defaultFormat) {
this.setState({ value }); this.setState({ value });
} }
const timeValue = value ? new Date(value.getTime()) : null; 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); this.props.onChange(timeValue);
}, },
render() { render() {

Loading…
Cancel
Save