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

Method componentDidMount

src/components/DayPicker.jsx:264–282  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

262 }
263
264 componentDidMount() {
265 const { orientation } = this.props;
266 const { currentMonth } = this.state;
267
268 const calendarInfoWidth = this.calendarInfo
269 ? calculateDimension(this.calendarInfo, 'width', true, true)
270 : 0;
271 const currentMonthScrollTop = this.transitionContainer && orientation === VERTICAL_SCROLLABLE
272 ? this.transitionContainer.scrollHeight - this.transitionContainer.scrollTop
273 : null;
274
275 this.setState({
276 isTouchDevice: isTouchDevice(),
277 calendarInfoWidth,
278 currentMonthScrollTop,
279 });
280
281 this.setCalendarMonthWeeks(currentMonth);
282 }
283
284 componentWillReceiveProps(nextProps, nextState) {
285 const {

Callers

nothing calls this directly

Calls 2

setCalendarMonthWeeksMethod · 0.95
calculateDimensionFunction · 0.85

Tested by

no test coverage detected