Component
Flip-Calendar Date Picker
Variants
The same markup drops into a normal page as a compact CSS calendar with a CSS page flip (no WebGL needed). Sizes and states below.
Usage
Paste the markup, include assets/css/tokens.css and assets/css/tailwind.css, then run the script from this page.
Accessibility
- Role and state. The days are real buttons inside an ARIA grid (role="grid", rows and gridcells with aria-selected). Each day has a full aria-label ("Monday, 16 November 2026") and a polite live region announces the pick.
- Keyboard. Tab into the grid, then arrows move by day and week (and cross month edges), Home and End jump to the week start and end, PageUp and PageDown flip the month, Enter or Space picks. Roving tabindex keeps one tab stop. Previous and next buttons are also real buttons.
- Reduced motion. With prefers-reduced-motion the page swap is instant, the confetti and the swing are skipped and the stamp still marks the picked day; the selection is always shown as text too.
- Contrast. The stage shows the picked date as large high-contrast text; the CSS variant uses the colour tokens, which keep AA contrast in light and dark and in every preset.