Skip to content

Commit

Permalink
Warn user when date is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
Dammmien committed Apr 14, 2018
1 parent 0c46805 commit 532b311
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/EditorWidgets/Date/DateControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export default class DateControl extends React.Component {
if (parsedDate.isValid()) {
const formattedValue = parsedDate.format(this.format);
onChange(formattedValue);
} else {
window.alert('The date you entered is invalid.');
}
}

Expand Down

0 comments on commit 532b311

Please sign in to comment.