MCPcopy Create free account
hub / github.com/react-dates/react-dates / onMonthChange

Method onMonthChange

src/components/DayPicker.jsx:574–587  ·  view source on GitHub ↗
(currentMonth)

Source from the content-addressed store, hash-verified

572 }
573
574 onMonthChange(currentMonth) {
575 this.setCalendarMonthWeeks(currentMonth);
576 this.calculateAndSetDayPickerHeight();
577
578 // Translation value is a hack to force an invisible transition that
579 // properly rerenders the CalendarMonthGrid
580 this.setState({
581 monthTransition: MONTH_SELECTION_TRANSITION,
582 translationValue: 0.00001,
583 focusedDate: null,
584 nextFocusedDate: currentMonth,
585 currentMonth,
586 });
587 }
588
589 onYearChange(currentMonth) {
590 this.setCalendarMonthWeeks(currentMonth);

Callers 1

DayPicker_spec.jsxFile · 0.45

Calls 2

setCalendarMonthWeeksMethod · 0.95

Tested by

no test coverage detected