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

Method constructor

src/components/CalendarMonth.jsx:94–107  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

92
93class CalendarMonth extends React.PureComponent {
94 constructor(props) {
95 super(props);
96
97 this.state = {
98 weeks: getCalendarMonthWeeks(
99 props.month,
100 props.enableOutsideDays,
101 props.firstDayOfWeek == null ? moment.localeData().firstDayOfWeek() : props.firstDayOfWeek,
102 ),
103 };
104
105 this.setCaptionRef = this.setCaptionRef.bind(this);
106 this.setMonthTitleHeight = this.setMonthTitleHeight.bind(this);
107 }
108
109 componentDidMount() {
110 this.setMonthTitleHeightTimeout = setTimeout(this.setMonthTitleHeight, 0);

Callers

nothing calls this directly

Calls 1

getCalendarMonthWeeksFunction · 0.85

Tested by

no test coverage detected