We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7c12fd commit 9509facCopy full SHA for 9509fac
DateTime.js
@@ -192,7 +192,13 @@ var Datetime = createClass({
192
}
193
194
195
-
+ //we should only show a valid date if we are provided a isValidDate function.
196
+ if (this.props.isValidDate) {
197
+ updatedState.viewDate = updatedState.viewDate || this.state.viewDate;
198
+ while (!this.props.isValidDate(updatedState.viewDate)) {
199
+ updatedState.viewDate = updatedState.viewDate.add(1, 'day');
200
+ }
201
202
this.setState( updatedState );
203
},
204
0 commit comments