MCPcopy
hub / github.com/flatpickr/flatpickr / buildDays

Function buildDays

src/index.ts:914–939  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

912 }
913
914 function buildDays() {
915 if (self.daysContainer === undefined) {
916 return;
917 }
918
919 clearNode(self.daysContainer);
920
921 // TODO: week numbers for each month
922 if (self.weekNumbers) clearNode(self.weekNumbers);
923
924 const frag = document.createDocumentFragment();
925
926 for (let i = 0; i < self.config.showMonths; i++) {
927 const d = new Date(self.currentYear, self.currentMonth, 1);
928 d.setMonth(self.currentMonth + i);
929
930 frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));
931 }
932
933 self.daysContainer.appendChild(frag);
934
935 self.days = self.daysContainer.firstChild as HTMLDivElement;
936 if (self.config.mode === "range" && self.selectedDates.length === 1) {
937 onMouseOver();
938 }
939 }
940
941 function buildMonthSwitch() {
942 if (

Callers 4

buildFunction · 0.85
changeMonthFunction · 0.85
redrawFunction · 0.85
selectDateFunction · 0.85

Calls 3

clearNodeFunction · 0.90
buildMonthDaysFunction · 0.85
onMouseOverFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…