Planner page
One chosen day, circled in marker; today underlined; the days before the 3rd hatched out. On its own sheet of card, taped at the corner. (Fixed dates, so the page looks the same tomorrow.)
A month on planner paper. The grid is ruled by hand, the day you chose is circled in marker, today is underlined in felt, a range is one highlighter swipe per week, and a day you may not pick is hatched out in pencil. react-day-picker v10 underneath: single, multiple and range selection, locales, right-to-left, week numbers, dropdown captions, several months.
npx shadcn@latest add @wobko/calendar第一次使用?先把 registry 加进 components.json。 如何安装
One chosen day, circled in marker; today underlined; the days before the 3rd hatched out. On its own sheet of card, taped at the corner. (Fixed dates, so the page looks the same tomorrow.)
Pick a first and a last day and each week gets one highlighter swipe with chisel ends; week numbers go in the margin behind a red pencil rule.
Month and year are native selects in pencil boxes, so jumping to a birthday takes two taps. Weekends and the past are hatched out and cannot be chosen; the arrows stop at the ends of the range.
A calendar on a card with time slots beside it: the chosen day drives the slots, the chosen slot drives the button. Weekends are closed, so they are hatched.
Pass a react-day-picker locale: Spanish starts the week on Monday; Arabic runs right to left, with Eastern Arabic numerals and one-letter weekdays (a `formatWeekdayName`, since the short names of that language do not fit a cell), and the rules, arrows and swipe ends turn around with it.
A react-day-picker `DayPicker`, so every prop of DayPicker works (`mode`, `selected`, `onSelect`, `required`, `disabled`, `hidden`, `modifiers`, `locale`, `dir`, `numberOfMonths`, `startMonth` / `endMonth`, `showWeekNumber`, `weekStartsOn`, `footer`, `timeZone`, ...). The root is transparent so it sits on the paper it is placed on (Card, Popover, Page); `sheet` gives it a sheet of its own.
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| captionLayout | "label" | "dropdown" | "dropdown-months" | "dropdown-years" | "label" | The month name in script, or native month / year selects drawn in pencil boxes. Dropdowns default to a hundred years back (set `startMonth` / `endMonth`). |
| showOutsideDays | boolean | true | Days of the neighboring months in the first and last week, in graphite. |
| buttonVariant | ButtonProps['variant'] | "ghost" | Variant of the previous / next month Buttons (real Buttons: hover swipe, press and drawn focus ring). |
| ruled | boolean | true | Hand-rule the grid (weekday rule, week rules, day rules, a red margin rule beside the week numbers). `false` leaves the page plain. |
| sheet | boolean | PaperProps | false | Put the calendar on a sheet of paper. `true` is a card; an object passes `stock`, `edge`, `tilt`, `tape`, `tapeKind`, `fastener`, `fastenerTone`, `fastenerClassName`, `shadow` and `seed` to Paper. A paper clip is set between the next-month arrow and the caption (not on the arrow); `fastenerClassName` moves it. |
| seed | string | number | - | Pins the hand: the same seed always rules the same grid. |
| components | Partial<CustomComponents> | - | Swap any DayPicker part; yours are merged over ours. |
| classNames | Partial<ClassNames> | - | Same keys as upstream shadcn (`root`, `months`, `month`, `nav`, `month_caption`, `weekday`, `day`, `today`, `range_start`, ...); merged over the defaults. |
CLI 会复制进你项目的文件。
正在加载源码