defuss-shadcn / Application / Scaffolds / scaffold-calendar
Calendar
An Apple-Calendar-style calendar as a clickdummy - "Agenda" for a small studio. Switch between day, week, month and year, page with the arrows or the mini calendar, create an event (double-click a slot or drag across one), open it, change it, delete it. The settings choose the day weeks start on, calendar weeks, weekends and working hours. Find a time gives every person a calendar of their own colour: where every lane is empty, everyone has time - pick a suggestion, let people vote Doodle-style and book the winner. Every date control is a shipped component: the Calendar (the mini calendar, the twelve months of the year view, the range pickers) and the Date Picker fields.
On this page (2)
§Calendar
The whole app in one source. Views are routes (#/week/2026-11-17, #/month/..., #/year/..., #/find) of defuss-dom-router; the language switch translates the frame with defuss-i18n and the dates follow the language. Double-click a slot or drag across one to create an event; keys: T today, D / W / M / Y the views, J / K next / previous, N new event.
§How it works
A page, not a component: it composes the library and keeps its own glue small.
- Calendar components everywhere - the mini calendar in the sidebar, the twelve months of the year view and the two range pickers are the shipped Calendar: days with events carry its day data (a dot, holidays in red, the titles in the label), a pick fires
calendar:select, the event editor's two months are one.calendar-rangeand Find a time searches the days of adata-mode="range"calendar. The start and end fields are Date Picker inputs (.date-input, native date and time). - Settings reach every calendar at once - the week start and the calendar weeks are two attributes on the app root,
data-week-startanddata-week-numbers, which every Calendar inside inherits; the app's own day, week and month grids read the same settings. They are kept withdf$.store.persisted, together with the hidden calendars, working hours, the clock and the default duration. - Views are routes - defuss-dom-router in hash mode:
#/day/2026-11-17,#/week/...,#/month/...,#/year/...and#/find. Back and forward walk the views, a date is linkable. See Client-side Routing. - Translation - defuss-i18n translates the frame between English and German; the dates, weekday names and the default week start follow the language through
Intl. Event titles stay as written. See Translation. - Events - repeat daily, on weekdays, weekly, monthly or yearly; overlapping events share their slot's width; a timed event over midnight shows on both days; holidays (Easter computed) are read-only. A double-click or a drag in the grid creates one, the card opens on a click, the Dialog edits it.
- Find a time - every person is a lane in their own colour inside each day; where every lane is empty for the meeting's duration, the column lights up "All free". Suggestions rank the slots by how many are free, the poll starts each vote from the person's calendar and a click cycles it (yes, if need be, no); Book takes the slot with the most yes votes.
- Full screen - app-calendar.html is generated from this page's example at build time, on its own bundle.
Comments, ideas or improvements? Edit this page's source on GitHub