components
All repositories: gitoria
1.6 KB
# Date pickerA date picker for input fields. Click a field: a month opens under it; click a day and the field shows it as `YYYY-MM-DD`.Typing works too; a typed date that is not a real day marks the field (`aria-invalid="true"`). Escape, Enter or a clickoutside closes the month; the arrows page through the months. One component gives you as many fields as you name, and eachposts in a form under its own name.Live demo: https://components.hybriel.worldapi.org/date-pickerPure Hybriel: one file, no JavaScript file. The browser's today is read, and the names follow the page language (`<html lang>`, English when none), when a field gets focus.## Use it in an appCopy `components/date-picker/date-picker.hl` (optionally `shared/tokens.hl` for the app's own accent; it carries its own `Style`), then:```import DatePicker from './date-picker.hl'View {form { method = "get" action = "/book"DatePicker { names = "arrival,departure" }}}```- `names` is a comma-separated list: one field per name (default: one field named `date`).- Do not wrap the picker in a `<label>`; the field's `title` carries its name.- Use ONE `DatePicker` per page (a composed component's members are the page's state) — give it all the fields of the page.- Colours are the semantic tokens only, each with a black/white/grey fallback: the base look is black, white and greys (no frames; root README "Look"); an app that declares the WorldAPI tokens (layouts.worldapi.org's theme) restyles it.## Not yetSetting a value from the page and reading it in the host (a composed component's members cannot be read by its host,hybriel#87 — the value goes out through the form), a min/max date, a second `DatePicker` on the same page.
Branches
Latest commits
- ca3b4959Re-vendor complete Hybriel plugins and runtime to day44mre
- df9e7df9Last-item checks run in the browser gate (components#26 fixed on day41); media-player loop is a plain Booleanmre
- 895a5afcRe-vendor complete Hybriel plugins and runtime to day41mre
- 16006bb3Backup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
- 88397fc3Re-vendor complete Hybriel plugins and runtime to day39mre
- 9b872cedRecord IC28 deployment and live icon verificationmre
- 46fefaa7Count the icons entry in the offline home-page checkmre
- c7e14cabRecord IC28 rerun and unchanged-main baseline comparisonmre
- 5e090ffdRecord IC28 review evidence and gate resultsmre
- adfe2c4dAdd shuffle, repeat and repeatOne shared iconsmre
- c96709c8media-player: skip = false and repeat = 'one' options (jukebox#19)mre
- bd4aa808Record VL24 deployment and live verificationmre
- e5b98ecfRun virtual-list gate before deploymentmre
- 2e9b4a8evirtual-list: into main, with centerId and scrollTop/onScroll (jukebox#20)mre
- 69954249Align all plugin sources with Hybriel day38bmre
- f740f666Re-vendor components to Hybriel set day38bmre
- 8176eb14Record CS23b deployment and live verificationmre
- 84e3ddaaRemove blank line before pagination Style closing bracemre
- a92298ddRecord exact CSS and same-date proof after specificity reviewmre
- c71a0abePreserve consumer theme specificity with nested tag rulesmre