@19h47/calendar

lang

Interactive examples of the calendar package. Each section documents a different option combination.

Single date

Default mode (single: true). Past dates are disabled. Use the lang picker above to switch locale and week start.

Single date + deselect

deselect: true — click the selected day again to clear it. French chrome labels (locale still follows the picker).

Date range

single: false — pick a start and an end. Hover highlights the range between the two clicks.

Range without header

Navigation controls are optional — only the grid is required (.js-body + .js-days).

Allow past dates

allowPast: true — days before today become selectable (range mode).

Preselected range

Initial view via data-year / data-month, selection via data-picked-dates (JSON YYYY-MM-DD days).

Custom markup

You own the chrome and the cell HTML. Only the hooks matter (.js-previous, .js-title, .js-next, .js-body, .js-days, .js-day). This demo swaps Bootstrap for a custom header, stateClasses, and a renderInner that rebuilds each day cell.