()
| 2774 | } |
| 2775 | |
| 2776 | function updateNavigationCurrentMonth() { |
| 2777 | if (self.config.noCalendar || self.isMobile || !self.monthNav) return; |
| 2778 | |
| 2779 | self.yearElements.forEach((yearElement, i) => { |
| 2780 | const d = new Date(self.currentYear, self.currentMonth, 1); |
| 2781 | d.setMonth(self.currentMonth + i); |
| 2782 | |
| 2783 | if ( |
| 2784 | self.config.showMonths > 1 || |
| 2785 | self.config.monthSelectorType === "static" |
| 2786 | ) { |
| 2787 | self.monthElements[i].textContent = |
| 2788 | monthToStr( |
| 2789 | d.getMonth(), |
| 2790 | self.config.shorthandCurrentMonth, |
| 2791 | self.l10n |
| 2792 | ) + " "; |
| 2793 | } else { |
| 2794 | self.monthsDropdownContainer.value = d.getMonth().toString(); |
| 2795 | } |
| 2796 | |
| 2797 | yearElement.value = d.getFullYear().toString(); |
| 2798 | }); |
| 2799 | |
| 2800 | self._hidePrevMonthArrow = |
| 2801 | self.config.minDate !== undefined && |
| 2802 | (self.currentYear === self.config.minDate.getFullYear() |
| 2803 | ? self.currentMonth <= self.config.minDate.getMonth() |
| 2804 | : self.currentYear < self.config.minDate.getFullYear()); |
| 2805 | |
| 2806 | self._hideNextMonthArrow = |
| 2807 | self.config.maxDate !== undefined && |
| 2808 | (self.currentYear === self.config.maxDate.getFullYear() |
| 2809 | ? self.currentMonth + 1 > self.config.maxDate.getMonth() |
| 2810 | : self.currentYear > self.config.maxDate.getFullYear()); |
| 2811 | } |
| 2812 | |
| 2813 | function getDateStr(specificFormat?: string) { |
| 2814 | const format = |
no test coverage detected
searching dependent graphs…