Date picker now takes max/min date into account on mount/props change.

old
Alex Gilleran 2016-07-21 23:24:28 +10:00
parent 9c4a48597a
commit e9487e164f
1 changed files with 2 additions and 5 deletions

View File

@ -41,7 +41,6 @@ const factory = (Dialog, Calendar) => {
componentWillMount () {
this.updateStateDate(this.props.value);
}
componentWillReceiveProps (nextProps) {
@ -69,11 +68,9 @@ const factory = (Dialog, Calendar) => {
updateStateDate = (date) => {
if (Object.prototype.toString.call(date) === '[object Date]') {
this.setState({
date
});
this.handleCalendarChange(date, false);
}
}
};
actions = [
{ label: 'Cancel', className: this.props.theme.button, onClick: this.props.onDismiss },