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

Method adjustDayPickerHeight

src/components/DayPicker.jsx:861–872  ·  view source on GitHub ↗
(newMonthHeight)

Source from the content-addressed store, hash-verified

859 }
860
861 adjustDayPickerHeight(newMonthHeight) {
862 const monthHeight = newMonthHeight + MONTH_PADDING;
863 if (monthHeight !== this.calendarMonthGridHeight) {
864 this.transitionContainer.style.height = `${monthHeight}px`;
865 if (!this.calendarMonthGridHeight) {
866 this.setCalendarMonthGridHeightTimeout = setTimeout(() => {
867 this.setState({ hasSetHeight: true });
868 }, 0);
869 }
870 this.calendarMonthGridHeight = monthHeight;
871 }
872 }
873
874 calculateAndSetDayPickerHeight() {
875 const { daySize, numberOfMonths } = this.props;

Callers 4

componentDidUpdateMethod · 0.95
onPrevMonthTransitionMethod · 0.95
onNextMonthTransitionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected