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

Method getWeekHeaders

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

Source from the content-addressed store, hash-verified

648 }
649
650 getWeekHeaders() {
651 const { weekDayFormat } = this.props;
652 const { currentMonth } = this.state;
653 const firstDayOfWeek = this.getFirstDayOfWeek();
654
655 const weekHeaders = [];
656 for (let i = 0; i < 7; i += 1) {
657 weekHeaders.push(currentMonth.clone().day((i + firstDayOfWeek) % 7).format(weekDayFormat));
658 }
659
660 return weekHeaders;
661 }
662
663 getFirstVisibleIndex() {
664 const { orientation } = this.props;

Callers 2

renderWeekHeaderMethod · 0.95
DayPicker_spec.jsxFile · 0.80

Calls 1

getFirstDayOfWeekMethod · 0.95

Tested by

no test coverage detected