Skip to content

Commit

Permalink
Fixed #1422 - If the invalid value is entered to Calendar with keepIn…
Browse files Browse the repository at this point in the history
…valid property, the onChange event returns null
  • Loading branch information
mertsincan committed Jun 25, 2020
1 parent b162ac8 commit ac2f9d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,9 @@ export class Calendar extends Component {
}
}
catch(err) {
//this.updateModel(event, rawValue);
//invalid date
this.updateModel(event, null);
let value = this.props.keepInvalid ? rawValue : null;
this.updateModel(event, value);
}

if (this.props.onInput) {
Expand Down

0 comments on commit ac2f9d1

Please sign in to comment.