calendarkit-pro 1.3.0 → 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 +26 -3
- package/dist/index.d.mts +45 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +1235 -559
- package/dist/index.mjs +1201 -525
- package/package.json +2 -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
|
|
@@ -245,6 +262,10 @@ const frenchTranslations = {
|
|
|
245
262
|
/>
|
|
246
263
|
```
|
|
247
264
|
|
|
265
|
+
All interface texts (views, event form, sidebar, accessible labels) come from the language pack selected by `language`; `translations` overrides individual keys. Calendars are only listed in the sidebar when you pass `calendars`.
|
|
266
|
+
|
|
267
|
+
Right-click an event to edit, duplicate or delete it (disabled in `readOnly`).
|
|
268
|
+
|
|
248
269
|
## Theming
|
|
249
270
|
|
|
250
271
|
```tsx
|
|
@@ -310,6 +331,8 @@ const calendars = [
|
|
|
310
331
|
/>
|
|
311
332
|
```
|
|
312
333
|
|
|
334
|
+
`initialAllDay` is `true` when the form is opened from the all-day row.
|
|
335
|
+
|
|
313
336
|
## Exports
|
|
314
337
|
|
|
315
338
|
```typescript
|
package/dist/index.d.mts
CHANGED
|
@@ -70,6 +70,49 @@ declare const en: {
|
|
|
70
70
|
noEventsScheduled: string;
|
|
71
71
|
noUpcoming: string;
|
|
72
72
|
noUpcomingHint: string;
|
|
73
|
+
newEvent: string;
|
|
74
|
+
saveChanges: string;
|
|
75
|
+
close: string;
|
|
76
|
+
noTitle: string;
|
|
77
|
+
openInMaps: string;
|
|
78
|
+
notesLabel: string;
|
|
79
|
+
addNotes: string;
|
|
80
|
+
attachments: string;
|
|
81
|
+
reminders: string;
|
|
82
|
+
add: string;
|
|
83
|
+
calendar: string;
|
|
84
|
+
select: string;
|
|
85
|
+
addLocation: string;
|
|
86
|
+
guestSingular: string;
|
|
87
|
+
addGuestPlaceholder: string;
|
|
88
|
+
invalidEmail: string;
|
|
89
|
+
removeGuest: string;
|
|
90
|
+
reminderAtTime: string;
|
|
91
|
+
reminderMinutes: string;
|
|
92
|
+
reminderHour: string;
|
|
93
|
+
reminderHours: string;
|
|
94
|
+
reminderDay: string;
|
|
95
|
+
reminderDays: string;
|
|
96
|
+
reminderWeek: string;
|
|
97
|
+
removeReminder: string;
|
|
98
|
+
durationMinutes: string;
|
|
99
|
+
durationHours: string;
|
|
100
|
+
durationHoursMinutes: string;
|
|
101
|
+
moreEvents: string;
|
|
102
|
+
idLabel: string;
|
|
103
|
+
previous: string;
|
|
104
|
+
next: string;
|
|
105
|
+
previousMonth: string;
|
|
106
|
+
nextMonth: string;
|
|
107
|
+
toggleSidebar: string;
|
|
108
|
+
toggleTheme: string;
|
|
109
|
+
switchLanguage: string;
|
|
110
|
+
eventColor: string;
|
|
111
|
+
showLess: string;
|
|
112
|
+
continuesBefore: string;
|
|
113
|
+
continuesAfter: string;
|
|
114
|
+
durationDay: string;
|
|
115
|
+
durationDays: string;
|
|
73
116
|
};
|
|
74
117
|
|
|
75
118
|
type ViewType = 'month' | 'week' | 'day' | 'agenda' | 'resource';
|
|
@@ -192,6 +235,8 @@ interface CalendarProps {
|
|
|
192
235
|
onClose: () => void;
|
|
193
236
|
event?: CalendarEvent | null;
|
|
194
237
|
initialDate?: Date;
|
|
238
|
+
/** True when the form is opened from the all-day row (preset to an all-day event). */
|
|
239
|
+
initialAllDay?: boolean;
|
|
195
240
|
onSave: (event: Partial<CalendarEvent>) => void;
|
|
196
241
|
onDelete?: (eventId: string) => void;
|
|
197
242
|
}) => React.ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -70,6 +70,49 @@ declare const en: {
|
|
|
70
70
|
noEventsScheduled: string;
|
|
71
71
|
noUpcoming: string;
|
|
72
72
|
noUpcomingHint: string;
|
|
73
|
+
newEvent: string;
|
|
74
|
+
saveChanges: string;
|
|
75
|
+
close: string;
|
|
76
|
+
noTitle: string;
|
|
77
|
+
openInMaps: string;
|
|
78
|
+
notesLabel: string;
|
|
79
|
+
addNotes: string;
|
|
80
|
+
attachments: string;
|
|
81
|
+
reminders: string;
|
|
82
|
+
add: string;
|
|
83
|
+
calendar: string;
|
|
84
|
+
select: string;
|
|
85
|
+
addLocation: string;
|
|
86
|
+
guestSingular: string;
|
|
87
|
+
addGuestPlaceholder: string;
|
|
88
|
+
invalidEmail: string;
|
|
89
|
+
removeGuest: string;
|
|
90
|
+
reminderAtTime: string;
|
|
91
|
+
reminderMinutes: string;
|
|
92
|
+
reminderHour: string;
|
|
93
|
+
reminderHours: string;
|
|
94
|
+
reminderDay: string;
|
|
95
|
+
reminderDays: string;
|
|
96
|
+
reminderWeek: string;
|
|
97
|
+
removeReminder: string;
|
|
98
|
+
durationMinutes: string;
|
|
99
|
+
durationHours: string;
|
|
100
|
+
durationHoursMinutes: string;
|
|
101
|
+
moreEvents: string;
|
|
102
|
+
idLabel: string;
|
|
103
|
+
previous: string;
|
|
104
|
+
next: string;
|
|
105
|
+
previousMonth: string;
|
|
106
|
+
nextMonth: string;
|
|
107
|
+
toggleSidebar: string;
|
|
108
|
+
toggleTheme: string;
|
|
109
|
+
switchLanguage: string;
|
|
110
|
+
eventColor: string;
|
|
111
|
+
showLess: string;
|
|
112
|
+
continuesBefore: string;
|
|
113
|
+
continuesAfter: string;
|
|
114
|
+
durationDay: string;
|
|
115
|
+
durationDays: string;
|
|
73
116
|
};
|
|
74
117
|
|
|
75
118
|
type ViewType = 'month' | 'week' | 'day' | 'agenda' | 'resource';
|
|
@@ -192,6 +235,8 @@ interface CalendarProps {
|
|
|
192
235
|
onClose: () => void;
|
|
193
236
|
event?: CalendarEvent | null;
|
|
194
237
|
initialDate?: Date;
|
|
238
|
+
/** True when the form is opened from the all-day row (preset to an all-day event). */
|
|
239
|
+
initialAllDay?: boolean;
|
|
195
240
|
onSave: (event: Partial<CalendarEvent>) => void;
|
|
196
241
|
onDelete?: (eventId: string) => void;
|
|
197
242
|
}) => React.ReactNode;
|