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

Method onYearChange

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

Source from the content-addressed store, hash-verified

587 }
588
589 onYearChange(currentMonth) {
590 this.setCalendarMonthWeeks(currentMonth);
591 this.calculateAndSetDayPickerHeight();
592
593 // Translation value is a hack to force an invisible transition that
594 // properly rerenders the CalendarMonthGrid
595 this.setState({
596 monthTransition: YEAR_SELECTION_TRANSITION,
597 translationValue: 0.0001,
598 focusedDate: null,
599 nextFocusedDate: currentMonth,
600 currentMonth,
601 });
602 }
603
604 onNextMonthClick(e) {
605 if (e) e.preventDefault();

Callers 1

DayPicker_spec.jsxFile · 0.45

Calls 2

setCalendarMonthWeeksMethod · 0.95

Tested by

no test coverage detected