MCPcopy
hub / github.com/flatpickr/flatpickr / bindEvents

Function bindEvents

src/plugins/monthSelect/index.ts:107–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105 }
106
107 function bindEvents() {
108 fp._bind(fp.prevMonthNav, "click", (e) => {
109 e.preventDefault();
110 e.stopPropagation();
111
112 fp.changeYear(fp.currentYear - 1);
113 selectYear();
114 buildMonths();
115 });
116
117 fp._bind(fp.nextMonthNav, "click", (e) => {
118 e.preventDefault();
119 e.stopPropagation();
120
121 fp.changeYear(fp.currentYear + 1);
122 selectYear();
123 buildMonths();
124 });
125
126 fp._bind(
127 self.monthsContainer as HTMLElement,
128 "mouseover",
129 (e: MouseEvent) => {
130 if (fp.config.mode === "range")
131 fp.onMouseOver(
132 getEventTarget(e) as DayElement,
133 "flatpickr-monthSelect-month"
134 );
135 }
136 );
137 }
138
139 function setCurrentlySelected() {
140 if (!fp.rContainer) return;

Callers

nothing calls this directly

Calls 3

getEventTargetFunction · 0.90
selectYearFunction · 0.85
buildMonthsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…