Calendar
Working Days
Working days of the week as seven toggles: two presets for the usual schedules and a live total in hours instead of abstract checkboxes.
What you can change
- label — the group heading above the toggles
- defaultDays — the days switched on at first render
- hoursPerDay — the length of a working day used in the total
A link for your AI agent: preview, code and instructions.
Preview
Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this on the home page as the hero:
https://vibeui.ru/c/calendar-022?lang=en&theme=dark
Not sure where to paste it? Step-by-step guide
Show the full instructions
What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.
Loading…
For developers
The install command lives in the “Component source” block below — a signed link that stays valid for 24 hours.
Technical notes
The component is self-contained: one file, zero dependencies, its own palette in local variables --vibeui-calendar-022-*. Client-side: the set of selected days lives in useState as an array of indices where 0 is Monday. The root is a <fieldset> with a <legend>, so the group of toggles is declared by form semantics; every day is a <button> with aria-pressed and an aria-label from the full day name, while the short caption is marked aria-hidden. The day names are taken from Intl.DateTimeFormat, so changing the locale changes the captions without a dictionary in the code. Weekends differ by a dashed border through [data-weekend], and the total is computed by multiplying the number of days by hoursPerDay and declined by the pluralize function.
Tags
- calendar
- weekday
- schedule
- settings
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…