METHODDESCRIPTION
updateGrid()Update the calendar grid to the month and year selected 1. Focus back on the month header button after month grid has been updated
setWeekdaysHeader()Make the calendar days header 1. Set the start of the week 2. Set the pattern for the day of the week 3. Add the day to the array 4. Return the array
setPrevMonth()Navigate previous in sequential month order 1. Go back a month if able to 2. Reset the calendar grid
setNextMonth()Navigate next in sequential month order 1. Go forward a month if able to 2. Reset the calendar grid
canChangeSubNavMonth()Validate if month can proceed previous. 1. If the current end of the month date is before the minimum date, return false
canChangeAddNavMonth()Validate if month can proceed next. 1. If the day is after the maximum date, return false
toggleMonthPopup()Toggle the month popup overlay 1. Starting Year: Get the current year - this.multiYear years (defaults to 3) 2. Ending Year: Get the current year + this.multiYear years (defaults to 3) 3. Get the years in between 4. Get the months in each year 5. Increment the year 6. Position scroll on year of clicked month
setGrid()Create days of month grid 1. Add empty days to align the first day of the month with the correct day of the week 2. Add the days of the selected month 3. Add empty days to align the end of the month with the end of the week
setActive()Apply active state if day has been selected 1. I'm adding a day because of some date fns bug that sets the date from string a day back 2. If a specific date is set, highlight it
setAvailableDay()Check if day can be selected
setAvailableMonth()Check if month can be selected
setToday()Check if day in calendar is today and highlight it
handleOnClickDay()Select the day and emit 1. Clear date reset 2. Bind to form control
handleOnChange()Change output binding
isRovingDay()Is this the day that carries `tabindex="0"`? Falls back — in order — to the explicitly focused day, the selected day, today, then the first day of the displayed month, so the grid always has exactly one tab stop.
handleOnGridKeydown()Handle keydown inside the day grid (WAI-ARIA grid keyboard model). 1. Left/Right move a day, Up/Down move a week 2. Home/End move to the start/end of the week 3. PageUp/PageDown move a month
handleOnKeydown()Handle keydown 1. Close the month calendar popup when escape is hit when the user is focused within the popup 2. Return focus back to the month selector button