Skip to content

Commit

Permalink
fix onChange doesn't fire on month change after initial day selection
Browse files Browse the repository at this point in the history
  • Loading branch information
EndiM committed Feb 6, 2019
1 parent 2ad4220 commit 185ab05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/datetime/src/datePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export class DatePicker extends AbstractPureComponent<IDatePickerProps, IDatePic
selectedDay: day.getDate(),
});
}
if (this.state.value == null || this.state.value.getMonth() !== day.getMonth()) {
if (this.state.value !== null && this.state.value.getMonth() !== day.getMonth()) {
this.ignoreNextMonthChange = true;
}

Expand Down

0 comments on commit 185ab05

Please sign in to comment.