Skip to main content

month_grid

Function month_grid 

Source
pub fn month_grid(month: Date, start: Weekday) -> [Date; 42]
Expand description

The block a month is drawn in: 42 real dates, beginning on the start weekday on or before the 1st.

Six rows even for a February that fits in four, so the card never changes height as you page months — a popover that resizes under the pointer moves the day you were about to click. Leading and trailing cells are real dates from the neighbouring months rather than blanks, which makes cell.month() != month.month() the only test a cell needs and leaves clicking one meaningful.