()
| 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; |
nothing calls this directly
no test coverage detected
searching dependent graphs…