gitoria

components

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit16006bb316006bb3Backup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre16006bb3/components/range-picker/README.md

1.7 KB

  1. # Date range picker
  2. HTML has no date range field. This is one text field for a period: click it, a month opens under it; click a
  3. day for the start, click another for the end. The start and end are marked, the days between are highlighted.
  4. The value is `YYYY-MM-DD – YYYY-MM-DD` (start – end). If the second day is before the first, they swap.
  5. Typing works too (`2028-02-01 – 2028-02-29`); text that is not two real days marks the field (`aria-invalid="true"`).
  6. Escape, Enter, or focusing the field again while only the start is picked drops that start and keeps the old range.
  7. Live demo: https://components.hybriel.worldapi.org/range-picker
  8. Pure 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 the field gets focus.
  9. ## Use it in an app
  10. Copy `components/range-picker/range-picker.hl` (optionally `shared/tokens.hl` for the app's own accent; it carries its own `Style`), then:
  11. ```
  12. import RangePicker from './range-picker.hl'
  13. View {
  14. form { method = "get" action = "/search"
  15. RangePicker { }
  16. }
  17. }
  18. ```
  19. - The field is named `range` (member `name`); it posts as `range=YYYY-MM-DD – YYYY-MM-DD`.
  20. - Do not wrap the picker in a `<label>`.
  21. - One per page (a composed component's members are the page's state).
  22. - 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.
  23. ## Not yet
  24. Setting the range from the page, reading start and end as separate members in the host (a composed component's members
  25. cannot be read by its host, hybriel#87), a second picker on one page.

Branches

Latest commits

  • 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
  • 64a2bc27Document CS23b style formatting proof and review statusmre
  • a72b57cficons: nest Style rules in the language's formmre
  • 927616e2pagination: nest Style rules in the language's formmre