calendarkit-pro 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -3
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +919 -415
- package/dist/index.mjs +883 -379
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ A professional, feature-rich React calendar component with drag-and-drop, recurr
|
|
|
10
10
|
- **5 Views** - Month, Week, Day, Agenda, and Resource views
|
|
11
11
|
- **Drag & Drop** - Move events with smooth animations and grid snapping
|
|
12
12
|
- **Event Resize** - Drag event edges to adjust duration
|
|
13
|
+
- **All-day & Multi-day Events** - Continuous bars, collapsible all-day row, move by days and stretch
|
|
13
14
|
- **Recurring Events** - Daily, weekly, monthly, yearly with RRule support
|
|
14
15
|
- **Timezone Support** - Full IANA timezone handling
|
|
15
16
|
- **i18n Ready** - Built-in English/French, fully customizable
|
|
@@ -165,13 +166,13 @@ interface CalendarTheme {
|
|
|
165
166
|
## Views
|
|
166
167
|
|
|
167
168
|
### Month View
|
|
168
|
-
Full month grid
|
|
169
|
+
Full month grid. All-day and multi-day events are continuous bars across their days. Click a date to switch to day view.
|
|
169
170
|
|
|
170
171
|
### Week View
|
|
171
|
-
7-day view with hourly time slots. Drag events to reschedule, resize from bottom edge.
|
|
172
|
+
7-day view with hourly time slots and an all-day row on top. Drag events to reschedule, resize from bottom edge.
|
|
172
173
|
|
|
173
174
|
### Day View
|
|
174
|
-
Single day with 15-minute time slots. Ideal for detailed scheduling.
|
|
175
|
+
Single day with 15-minute time slots and the all-day row. Ideal for detailed scheduling.
|
|
175
176
|
|
|
176
177
|
### Agenda View
|
|
177
178
|
Chronological list of upcoming events for 30 days. Shows event details and metadata.
|
|
@@ -179,6 +180,22 @@ Chronological list of upcoming events for 30 days. Shows event details and metad
|
|
|
179
180
|
### Resource View
|
|
180
181
|
Horizontal timeline for scheduling across resources (rooms, people, equipment).
|
|
181
182
|
|
|
183
|
+
## All-day and Multi-day Events
|
|
184
|
+
|
|
185
|
+
```tsx
|
|
186
|
+
const events = [
|
|
187
|
+
// All-day: the end is exclusive, this offsite covers 12–14 October
|
|
188
|
+
{ id: 'offsite', title: 'Offsite', start: new Date(2026, 9, 12), end: new Date(2026, 9, 15), allDay: true },
|
|
189
|
+
// Timed events of 24 hours or more are shown with the all-day events
|
|
190
|
+
{ id: 'flight', title: 'Flight', start: new Date(2026, 9, 14, 22), end: new Date(2026, 9, 16, 4) },
|
|
191
|
+
];
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
- All-day events are calendar dates: `timezone` never shifts them. The end is exclusive (midnight after the last day); an end at 23:59 on the same day, or equal to the start, means one day. Date-only values such as `new Date('2026-10-12')` keep their date in every timezone.
|
|
195
|
+
- The week and day views show them in a collapsible row above the grid (2 lanes, then "+N more"). The month view draws continuous bars (up to 3 lanes per week); its "+N more" counts the hidden bars and events of the day.
|
|
196
|
+
- Drag a bar to move it by whole days, or stretch its right edge to change its last day. `onEventDrop` / `onEventResize` then `onEventUpdate` fire as for timed events; `draggable: false`, `resizable: false` and `readOnly` apply.
|
|
197
|
+
- Click an empty day of the all-day row to create an all-day event. The event form has an All Day switch and shows the last day included.
|
|
198
|
+
|
|
182
199
|
## Recurring Events
|
|
183
200
|
|
|
184
201
|
```tsx
|
|
@@ -314,6 +331,8 @@ const calendars = [
|
|
|
314
331
|
/>
|
|
315
332
|
```
|
|
316
333
|
|
|
334
|
+
`initialAllDay` is `true` when the form is opened from the all-day row.
|
|
335
|
+
|
|
317
336
|
## Exports
|
|
318
337
|
|
|
319
338
|
```typescript
|
package/dist/index.d.mts
CHANGED
|
@@ -108,6 +108,11 @@ declare const en: {
|
|
|
108
108
|
toggleTheme: string;
|
|
109
109
|
switchLanguage: string;
|
|
110
110
|
eventColor: string;
|
|
111
|
+
showLess: string;
|
|
112
|
+
continuesBefore: string;
|
|
113
|
+
continuesAfter: string;
|
|
114
|
+
durationDay: string;
|
|
115
|
+
durationDays: string;
|
|
111
116
|
};
|
|
112
117
|
|
|
113
118
|
type ViewType = 'month' | 'week' | 'day' | 'agenda' | 'resource';
|
|
@@ -230,6 +235,8 @@ interface CalendarProps {
|
|
|
230
235
|
onClose: () => void;
|
|
231
236
|
event?: CalendarEvent | null;
|
|
232
237
|
initialDate?: Date;
|
|
238
|
+
/** True when the form is opened from the all-day row (preset to an all-day event). */
|
|
239
|
+
initialAllDay?: boolean;
|
|
233
240
|
onSave: (event: Partial<CalendarEvent>) => void;
|
|
234
241
|
onDelete?: (eventId: string) => void;
|
|
235
242
|
}) => React.ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -108,6 +108,11 @@ declare const en: {
|
|
|
108
108
|
toggleTheme: string;
|
|
109
109
|
switchLanguage: string;
|
|
110
110
|
eventColor: string;
|
|
111
|
+
showLess: string;
|
|
112
|
+
continuesBefore: string;
|
|
113
|
+
continuesAfter: string;
|
|
114
|
+
durationDay: string;
|
|
115
|
+
durationDays: string;
|
|
111
116
|
};
|
|
112
117
|
|
|
113
118
|
type ViewType = 'month' | 'week' | 'day' | 'agenda' | 'resource';
|
|
@@ -230,6 +235,8 @@ interface CalendarProps {
|
|
|
230
235
|
onClose: () => void;
|
|
231
236
|
event?: CalendarEvent | null;
|
|
232
237
|
initialDate?: Date;
|
|
238
|
+
/** True when the form is opened from the all-day row (preset to an all-day event). */
|
|
239
|
+
initialAllDay?: boolean;
|
|
233
240
|
onSave: (event: Partial<CalendarEvent>) => void;
|
|
234
241
|
onDelete?: (eventId: string) => void;
|
|
235
242
|
}) => React.ReactNode;
|