Skip to content

Commit 405f4e8

Browse files
committed
Parse updated viewDate with moment()
viewDate should always be parsed with moment, in both initial parse and updated
1 parent a392b22 commit 405f4e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DateTime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ var Datetime = createClass({
193193
}
194194

195195
if ( nextProps.viewDate !== this.props.viewDate ) {
196-
updatedState.viewDate = nextProps.viewDate;
196+
updatedState.viewDate = moment(nextProps.viewDate);
197197
}
198198
//we should only show a valid date if we are provided a isValidDate function. Removed in 2.10.3
199199
/*if (this.props.isValidDate) {

0 commit comments

Comments
 (0)