@coinbase/cds-mcp-server 8.53.1 → 8.54.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/CHANGELOG.md CHANGED
@@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.
8
8
 
9
9
  <!-- template-start -->
10
10
 
11
+ ## 8.54.0 ((3/18/2026, 02:27 PM PST))
12
+
13
+ This is an artificial version bump with no new change.
14
+
11
15
  ## 8.53.1 ((3/17/2026, 10:58 AM PST))
12
16
 
13
17
  This is an artificial version bump with no new change.
@@ -0,0 +1,518 @@
1
+ # Calendar
2
+
3
+ Calendar is a flexible, accessible date grid component for selecting dates, supporting keyboard navigation, disabled/highlighted dates, and custom rendering.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { Calendar } from '@coinbase/cds-mobile/dates/Calendar'
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ Calendar is a date grid for selecting dates and powers the picker in [DatePicker](/components/other/DatePicker). It can be used standalone or inside a [Tray](/components/overlay/Tray) with a confirm action.
14
+
15
+ ### Basic usage
16
+
17
+ A basic Calendar with date selection functionality. The Calendar component is used within the DatePicker and can also be used independently.
18
+
19
+ ```jsx
20
+ function Example() {
21
+ const [selectedDate, setSelectedDate] = useState(new Date());
22
+
23
+ return <Calendar selectedDate={selectedDate} onPressDate={setSelectedDate} />;
24
+ }
25
+ ```
26
+
27
+ ### No selection
28
+
29
+ A Calendar without an initially selected date.
30
+
31
+ ```jsx
32
+ function Example() {
33
+ const [selectedDate, setSelectedDate] = useState(null);
34
+
35
+ return <Calendar selectedDate={selectedDate} onPressDate={setSelectedDate} />;
36
+ }
37
+ ```
38
+
39
+ ### Seeding the calendar
40
+
41
+ The `seedDate` prop controls which month the Calendar opens to when there is no selected date value. Defaults to today when undefined.
42
+
43
+ ```jsx
44
+ function Example() {
45
+ const [selectedDate, setSelectedDate] = useState(null);
46
+
47
+ const today = new Date(new Date().setHours(0, 0, 0, 0));
48
+ const seedDate = new Date(today.getFullYear(), today.getMonth() + 1, 15);
49
+
50
+ return <Calendar selectedDate={selectedDate} onPressDate={setSelectedDate} seedDate={seedDate} />;
51
+ }
52
+ ```
53
+
54
+ ### Minimum and maximum dates
55
+
56
+ Use `minDate` and `maxDate` to restrict the selectable date range. Navigation to dates before the `minDate` and after the `maxDate` is disabled. Make sure to provide the `disabledDateError` prop.
57
+
58
+ ```jsx
59
+ function Example() {
60
+ const [selectedDate, setSelectedDate] = useState(new Date());
61
+
62
+ const today = new Date(new Date().setHours(0, 0, 0, 0));
63
+ const lastMonth15th = new Date(today.getFullYear(), today.getMonth() - 1, 15);
64
+ const nextMonth15th = new Date(today.getFullYear(), today.getMonth() + 1, 15);
65
+
66
+ return (
67
+ <Calendar
68
+ selectedDate={selectedDate}
69
+ onPressDate={setSelectedDate}
70
+ minDate={lastMonth15th}
71
+ maxDate={nextMonth15th}
72
+ disabledDateError="Date is outside allowed range"
73
+ />
74
+ );
75
+ }
76
+ ```
77
+
78
+ ### Future dates only
79
+
80
+ Restrict selection to future dates by setting `minDate` to today.
81
+
82
+ ```jsx
83
+ function Example() {
84
+ const [selectedDate, setSelectedDate] = useState(null);
85
+
86
+ const today = new Date(new Date().setHours(0, 0, 0, 0));
87
+
88
+ return (
89
+ <Calendar
90
+ selectedDate={selectedDate}
91
+ onPressDate={setSelectedDate}
92
+ minDate={today}
93
+ disabledDateError="Past dates are not available"
94
+ />
95
+ );
96
+ }
97
+ ```
98
+
99
+ ### Highlighted dates
100
+
101
+ Use `highlightedDates` to visually emphasize specific dates or date ranges. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges.
102
+
103
+ ```jsx
104
+ function Example() {
105
+ const [selectedDate, setSelectedDate] = useState(new Date());
106
+
107
+ const today = new Date(new Date().setHours(0, 0, 0, 0));
108
+ const yesterday = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 1);
109
+ const nextWeek = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 7);
110
+
111
+ return (
112
+ <Calendar
113
+ selectedDate={selectedDate}
114
+ onPressDate={setSelectedDate}
115
+ highlightedDates={[yesterday, today, nextWeek]}
116
+ />
117
+ );
118
+ }
119
+ ```
120
+
121
+ ### Disabled dates
122
+
123
+ Use `disabledDates` to prevent selection of specific dates or date ranges. Make sure to provide the `disabledDateError` prop.
124
+
125
+ ```jsx
126
+ function Example() {
127
+ const [selectedDate, setSelectedDate] = useState(null);
128
+
129
+ const today = new Date(new Date().setHours(0, 0, 0, 0));
130
+
131
+ // Disable weekends for demonstration
132
+ const getNextWeekendDates = (centerDate) => {
133
+ const weekends = [];
134
+ const currentDate = new Date(centerDate);
135
+
136
+ // Find next 4 weekends
137
+ for (let i = 0; i < 4; i++) {
138
+ // Find next Saturday
139
+ const daysUntilSaturday = (6 - currentDate.getDay() + 7) % 7 || 7;
140
+ currentDate.setDate(currentDate.getDate() + daysUntilSaturday);
141
+
142
+ const saturday = new Date(currentDate);
143
+ const sunday = new Date(currentDate);
144
+ sunday.setDate(sunday.getDate() + 1);
145
+
146
+ weekends.push([saturday, sunday]);
147
+
148
+ // Move to next week
149
+ currentDate.setDate(currentDate.getDate() + 7);
150
+ }
151
+
152
+ return weekends;
153
+ };
154
+
155
+ return (
156
+ <Calendar
157
+ selectedDate={selectedDate}
158
+ onPressDate={setSelectedDate}
159
+ disabledDates={getNextWeekendDates(today)}
160
+ disabledDateError="Weekends are not available"
161
+ />
162
+ );
163
+ }
164
+ ```
165
+
166
+ ### Date ranges
167
+
168
+ Highlight a date range using a tuple `[startDate, endDate]`.
169
+
170
+ ```jsx
171
+ function Example() {
172
+ const [selectedDate, setSelectedDate] = useState(new Date());
173
+
174
+ const today = new Date(new Date().setHours(0, 0, 0, 0));
175
+ const yesterday = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 1);
176
+ const nextWeek = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 7);
177
+
178
+ return (
179
+ <Calendar
180
+ selectedDate={selectedDate}
181
+ onPressDate={setSelectedDate}
182
+ highlightedDates={[[yesterday, nextWeek]]}
183
+ />
184
+ );
185
+ }
186
+ ```
187
+
188
+ ### Hidden controls
189
+
190
+ Hide the navigation arrows with `hideControls`. This is typically used when `minDate` and `maxDate` are set to the first and last days of the same month.
191
+
192
+ ```jsx
193
+ function Example() {
194
+ const [selectedDate, setSelectedDate] = useState(new Date());
195
+
196
+ const today = new Date(new Date().setHours(0, 0, 0, 0));
197
+ const firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
198
+ const lastDayOfMonth = new Date(today.getFullYear(), today.getMonth() + 1, 0);
199
+
200
+ return (
201
+ <Calendar
202
+ selectedDate={selectedDate}
203
+ onPressDate={setSelectedDate}
204
+ minDate={firstDayOfMonth}
205
+ maxDate={lastDayOfMonth}
206
+ hideControls
207
+ />
208
+ );
209
+ }
210
+ ```
211
+
212
+ ### Disabled
213
+
214
+ Disable the entire Calendar with the `disabled` prop.
215
+
216
+ ```jsx
217
+ function Example() {
218
+ const selectedDate = new Date();
219
+
220
+ return <Calendar selectedDate={selectedDate} disabled />;
221
+ }
222
+ ```
223
+
224
+ ### Slot styling
225
+
226
+ Use the `styles` prop to target: **`root`** (outer container), **`header`** (month row), **`title`** (month/year text), **`navigation`** (both arrow buttons’ container), **`content`** (weekday row + date grid), and **`day`** (each date cell pressable — single `ViewStyle`).
227
+
228
+ ```jsx
229
+ function Example() {
230
+ const [selectedDate, setSelectedDate] = useState(new Date());
231
+
232
+ return (
233
+ <Calendar
234
+ selectedDate={selectedDate}
235
+ onPressDate={setSelectedDate}
236
+ styles={{
237
+ root: {
238
+ backgroundColor: 'lightgray',
239
+ borderColor: '#ccc',
240
+ borderRadius: 16,
241
+ borderWidth: 1,
242
+ padding: 12,
243
+ },
244
+ header: {
245
+ backgroundColor: 'rgba(0, 120, 0, 0.1)',
246
+ borderRadius: 16,
247
+ paddingBottom: 0,
248
+ },
249
+ title: { opacity: 0.9 },
250
+ navigation: {
251
+ borderColor: '#888',
252
+ borderRadius: 8,
253
+ borderStyle: 'dashed',
254
+ borderWidth: 1,
255
+ padding: 4,
256
+ },
257
+ content: { paddingVertical: 8 },
258
+ day: { borderRadius: 8 },
259
+ }}
260
+ />
261
+ );
262
+ }
263
+ ```
264
+
265
+ ### Accessibility
266
+
267
+ Always provide accessibility labels for the navigation controls and error messages for disabled dates.
268
+
269
+ ```jsx
270
+ function Example() {
271
+ const [selectedDate, setSelectedDate] = useState(new Date());
272
+
273
+ const today = new Date(new Date().setHours(0, 0, 0, 0));
274
+ const nextMonth = new Date(today.getFullYear(), today.getMonth() + 1, today.getDate());
275
+
276
+ return (
277
+ <Calendar
278
+ selectedDate={selectedDate}
279
+ onPressDate={setSelectedDate}
280
+ maxDate={nextMonth}
281
+ disabledDateError="Date is not available for selection"
282
+ nextArrowAccessibilityLabel="Go to next month"
283
+ previousArrowAccessibilityLabel="Go to previous month"
284
+ todayAccessibilityHint="Today"
285
+ highlightedDateAccessibilityHint="Highlighted"
286
+ />
287
+ );
288
+ }
289
+ ```
290
+
291
+ ### Date selection with Chip trigger
292
+
293
+ When you need a compact trigger instead of the full [DateInput](/components/other/DateInput/) used in [DatePicker](/components/other/DatePicker/), you can use a [Chip](/components/inputs/Chip) (or similar control) to open a Tray with a Calendar and a confirm button.
294
+
295
+ ```jsx
296
+ function Example() {
297
+ const { locale } = useLocale();
298
+ const [date, setDate] = useState(null);
299
+ const [showPicker, setShowPicker] = useState(false);
300
+ const [calendarSelectedDate, setCalendarSelectedDate] = useState(null);
301
+ const calendarRef = useRef(null);
302
+
303
+ const formatDateLabel = useCallback(
304
+ (date, locale) =>
305
+ date
306
+ ? date.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' })
307
+ : 'Select date',
308
+ [],
309
+ );
310
+
311
+ const handleOpenPicker = useCallback(() => {
312
+ setCalendarSelectedDate(date);
313
+ setShowPicker(true);
314
+ }, [date]);
315
+
316
+ const handleClosePicker = useCallback(() => setShowPicker(false), []);
317
+
318
+ const handleCancelPicker = useCallback(() => {
319
+ setCalendarSelectedDate(null);
320
+ handleClosePicker();
321
+ }, [handleClosePicker]);
322
+
323
+ const handleCalendarDatePress = useCallback((selectedDate) => {
324
+ setCalendarSelectedDate(selectedDate);
325
+ }, []);
326
+
327
+ const handleModalShow = useCallback(() => {
328
+ calendarRef.current?.focusInitialDate();
329
+ }, []);
330
+
331
+ const handleConfirmCalendar = useCallback(() => {
332
+ if (calendarSelectedDate) {
333
+ setDate(calendarSelectedDate);
334
+ handleClosePicker();
335
+ }
336
+ }, [calendarSelectedDate, handleClosePicker]);
337
+
338
+ const formattedLabel = formatDateLabel(date, locale);
339
+
340
+ const trayFooter = useMemo(
341
+ () => (
342
+ <Box paddingTop={3} paddingX={3}>
343
+ <Button
344
+ block
345
+ compact
346
+ accessibilityHint={!calendarSelectedDate ? 'Select a date first' : undefined}
347
+ accessibilityLabel="Confirm date selection"
348
+ disabled={!calendarSelectedDate}
349
+ onPress={handleConfirmCalendar}
350
+ >
351
+ Confirm
352
+ </Button>
353
+ </Box>
354
+ ),
355
+ [calendarSelectedDate, handleConfirmCalendar],
356
+ );
357
+
358
+ return (
359
+ <>
360
+ <Box alignSelf="flex-start">
361
+ <Chip
362
+ compact
363
+ accessibilityLabel={formattedLabel}
364
+ end={<AnimatedCaret active color="fg" rotate={showPicker ? 0 : 180} size="xs" />}
365
+ onPress={handleOpenPicker}
366
+ >
367
+ {formattedLabel}
368
+ </Chip>
369
+ </Box>
370
+ {showPicker && (
371
+ <Tray
372
+ accessibilityRole="none"
373
+ footer={trayFooter}
374
+ handleBarAccessibilityLabel="Close calendar"
375
+ handleBarVariant="inside"
376
+ onCloseComplete={handleCancelPicker}
377
+ onOpenComplete={handleModalShow}
378
+ >
379
+ <Calendar
380
+ ref={calendarRef}
381
+ onPressDate={handleCalendarDatePress}
382
+ paddingBottom={2}
383
+ paddingX={2}
384
+ selectedDate={calendarSelectedDate}
385
+ />
386
+ </Tray>
387
+ )}
388
+ </>
389
+ );
390
+ }
391
+ ```
392
+
393
+ ## Props
394
+
395
+ | Prop | Type | Required | Default | Description |
396
+ | --- | --- | --- | --- | --- |
397
+ | `alignContent` | `flex-start \| flex-end \| center \| stretch \| space-between \| space-around \| space-evenly` | No | `-` | - |
398
+ | `alignItems` | `flex-start \| flex-end \| center \| stretch \| baseline` | No | `-` | - |
399
+ | `alignSelf` | `auto \| FlexAlignType` | No | `-` | - |
400
+ | `animated` | `boolean` | No | `-` | - |
401
+ | `aspectRatio` | `string \| number` | No | `-` | - |
402
+ | `background` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - |
403
+ | `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
404
+ | `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
405
+ | `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
406
+ | `borderColor` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - |
407
+ | `borderEndWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
408
+ | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
409
+ | `borderStartWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
410
+ | `borderTopLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
411
+ | `borderTopRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
412
+ | `borderTopWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
413
+ | `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
414
+ | `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. |
415
+ | `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. |
416
+ | `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. |
417
+ | `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. |
418
+ | `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. |
419
+ | `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. |
420
+ | `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. |
421
+ | `bottom` | `string \| number` | No | `-` | - |
422
+ | `color` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - |
423
+ | `columnGap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
424
+ | `dangerouslySetBackground` | `string` | No | `-` | - |
425
+ | `disabled` | `boolean` | No | `-` | Disables user interaction. |
426
+ | `disabledDateError` | `string` | No | `'Date unavailable'` | Tooltip content shown when hovering or focusing a disabled date, including dates before the minDate or after the maxDate. |
427
+ | `disabledDates` | `(Date \| [Date, Date])[]` | No | `-` | Array of disabled dates, and date tuples for date ranges. Make sure to set disabledDateError as well. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges. |
428
+ | `display` | `flex \| none` | No | `-` | - |
429
+ | `elevation` | `0 \| 1 \| 2` | No | `-` | Determines box shadow styles. Parent should have overflow set to visible to ensure styles are not clipped. |
430
+ | `flexBasis` | `string \| number` | No | `-` | - |
431
+ | `flexDirection` | `row \| column \| row-reverse \| column-reverse` | No | `-` | - |
432
+ | `flexGrow` | `number` | No | `-` | - |
433
+ | `flexShrink` | `number` | No | `-` | - |
434
+ | `flexWrap` | `wrap \| nowrap \| wrap-reverse` | No | `-` | - |
435
+ | `font` | `inherit \| FontFamily` | No | `-` | - |
436
+ | `fontFamily` | `inherit \| FontFamily` | No | `-` | - |
437
+ | `fontSize` | `inherit \| FontSize` | No | `-` | - |
438
+ | `fontWeight` | `inherit \| FontWeight` | No | `-` | - |
439
+ | `gap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
440
+ | `height` | `string \| number` | No | `-` | - |
441
+ | `hideControls` | `boolean` | No | `-` | Hides the Calendar next and previous month arrows. This probably only makes sense to be used when minDate and maxDate are set to the first and last days of the same month. |
442
+ | `highlightedDateAccessibilityHint` | `string` | No | `'Highlighted'` | Accessibility hint announced for highlighted dates. Applied to all highlighted dates. |
443
+ | `highlightedDates` | `(Date \| [Date, Date])[]` | No | `-` | Array of highlighted dates, and date tuples for date ranges. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges. |
444
+ | `justifyContent` | `flex-start \| flex-end \| center \| space-between \| space-around \| space-evenly` | No | `-` | - |
445
+ | `key` | `Key \| null` | No | `-` | - |
446
+ | `left` | `string \| number` | No | `-` | - |
447
+ | `lineHeight` | `inherit \| LineHeight` | No | `-` | - |
448
+ | `margin` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
449
+ | `marginBottom` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
450
+ | `marginEnd` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
451
+ | `marginStart` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
452
+ | `marginTop` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
453
+ | `marginX` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
454
+ | `marginY` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
455
+ | `maxDate` | `Date` | No | `-` | Maximum date allowed to be selected, inclusive. Dates after the maxDate are disabled. All navigation to months after the maxDate is disabled. |
456
+ | `maxHeight` | `string \| number` | No | `-` | - |
457
+ | `maxWidth` | `string \| number` | No | `-` | - |
458
+ | `minDate` | `Date` | No | `-` | Minimum date allowed to be selected, inclusive. Dates before the minDate are disabled. All navigation to months before the minDate is disabled. |
459
+ | `minHeight` | `string \| number` | No | `-` | - |
460
+ | `minWidth` | `string \| number` | No | `-` | - |
461
+ | `nextArrowAccessibilityLabel` | `string` | No | `'Go to next month'` | Accessibility label describing the Calendar next month arrow. |
462
+ | `onPointerCancel` | `((event: PointerEvent) => void)` | No | `-` | - |
463
+ | `onPointerCancelCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
464
+ | `onPointerDown` | `((event: PointerEvent) => void)` | No | `-` | - |
465
+ | `onPointerDownCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
466
+ | `onPointerEnter` | `((event: PointerEvent) => void)` | No | `-` | - |
467
+ | `onPointerEnterCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
468
+ | `onPointerLeave` | `((event: PointerEvent) => void)` | No | `-` | - |
469
+ | `onPointerLeaveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
470
+ | `onPointerMove` | `((event: PointerEvent) => void)` | No | `-` | - |
471
+ | `onPointerMoveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
472
+ | `onPointerUp` | `((event: PointerEvent) => void)` | No | `-` | - |
473
+ | `onPointerUpCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
474
+ | `onPressDate` | `((date: Date) => void)` | No | `-` | Callback function fired when pressing a Calendar date. |
475
+ | `opacity` | `number \| AnimatedNode` | No | `-` | - |
476
+ | `overflow` | `visible \| hidden \| scroll` | No | `-` | - |
477
+ | `padding` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
478
+ | `paddingBottom` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
479
+ | `paddingEnd` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
480
+ | `paddingStart` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
481
+ | `paddingTop` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
482
+ | `paddingX` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
483
+ | `paddingY` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
484
+ | `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
485
+ | `position` | `static \| relative \| fixed \| absolute \| sticky` | No | `-` | - |
486
+ | `previousArrowAccessibilityLabel` | `string` | No | `'Go to previous month'` | Accessibility label describing the Calendar previous month arrow. |
487
+ | `ref` | `((instance: CalendarRefHandle \| null) => void) \| RefObject<CalendarRefHandle> \| null` | No | `-` | - |
488
+ | `right` | `string \| number` | No | `-` | - |
489
+ | `rowGap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
490
+ | `seedDate` | `Date` | No | `-` | Date used to generate the Calendar month when there is no value for the selectedDate prop, defaults to today. |
491
+ | `selectedDate` | `Date \| null` | No | `-` | Currently selected Calendar date. Date used to generate the Calendar month. Will be rendered with active styles. |
492
+ | `style` | `false \| RegisteredStyle<ViewStyle> \| Value \| AnimatedInterpolation<string \| number> \| WithAnimatedObject<ViewStyle> \| WithAnimatedArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>> \| readonly (Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>)[]> \| null` | No | `-` | - |
493
+ | `styles` | `{ root?: StyleProp<ViewStyle>; header?: StyleProp<ViewStyle>; title?: StyleProp<TextStyle>; navigation?: StyleProp<ViewStyle>; content?: StyleProp<ViewStyle>; day?: StyleProp<ViewStyle>; }` | No | `-` | Custom styles for individual elements of the Calendar component. |
494
+ | `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID Used to locate this element in unit and end-to-end tests. Used to locate this view in end-to-end tests. |
495
+ | `textAlign` | `left \| right \| auto \| center \| justify` | No | `-` | - |
496
+ | `textDecorationLine` | `none \| underline \| line-through \| underline line-through` | No | `-` | - |
497
+ | `textDecorationStyle` | `solid \| dotted \| dashed \| double` | No | `-` | - |
498
+ | `textTransform` | `none \| capitalize \| uppercase \| lowercase` | No | `-` | - |
499
+ | `todayAccessibilityHint` | `string` | No | `'Today'` | Accessibility hint for the current day when it is not disabled. Omit or leave default for non-localized usage. |
500
+ | `top` | `string \| number` | No | `-` | - |
501
+ | `transform` | `string \| (({ scaleX: AnimatableNumericValue; } & { scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ scaleY: AnimatableNumericValue; } & { scaleX?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ translateX: AnimatableNumericValue \| ${number}%; } & { scaleX?: undefined; scaleY?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ translateY: AnimatableNumericValue \| ${number}%; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ perspective: AnimatableNumericValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotate: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotateX: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotateY: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotateZ: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ scale: AnimatableNumericValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ skewX: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ skewY: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; matrix?: undefined; }) \| ({ matrix: AnimatableNumericValue[]; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; }))[]` | No | `-` | - |
502
+ | `userSelect` | `none \| auto \| text \| contain \| all` | No | `-` | - |
503
+ | `width` | `string \| number` | No | `-` | - |
504
+ | `zIndex` | `number` | No | `-` | - |
505
+
506
+
507
+ ## Styles
508
+
509
+ | Selector | Static class name | Description |
510
+ | --- | --- | --- |
511
+ | `root` | `-` | Root container element |
512
+ | `header` | `-` | Header row containing month label and navigation arrows |
513
+ | `title` | `-` | Month and year title text element |
514
+ | `navigation` | `-` | Navigation controls element |
515
+ | `content` | `-` | Container for the days-of-week header and the date grid |
516
+ | `day` | `-` | Individual date cell element, basic ViewStyle applied to the pressable wrapper |
517
+
518
+
@@ -467,6 +467,7 @@ The DateInput fires events in a specific order:
467
467
  | `disableFullscreenUI` | `boolean` | No | `-` | When false, if there is a small amount of space available around a text input (e.g. landscape orientation on a phone), the OS may choose to have the user edit the text inside of a full screen text input mode. When true, this feature is disabled and users will always edit the text directly inside of the text input. Defaults to false. |
468
468
  | `disabled` | `boolean` | No | `false` | Toggles input interactability and opacity |
469
469
  | `disabledDateError` | `string` | No | `'Date unavailable'` | Error text to display when a disabled date is selected, including dates before the minDate or after the maxDate. However if the selected date is more than 100 years before the minDate or more than 100 years after the maxDate, the invalidDateError will be displayed instead. |
470
+ | `disabledDates` | `(Date \| [Date, Date])[]` | No | `-` | Array of disabled dates, and date tuples for date ranges. Make sure to set disabledDateError as well. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges. |
470
471
  | `editable` | `boolean` | No | `-` | If false, text is not editable. The default value is true. |
471
472
  | `enableColorSurge` | `boolean` | No | `-` | Enable Color Surge motion |
472
473
  | `enablesReturnKeyAutomatically` | `boolean` | No | `-` | If true, the keyboard disables the return key when there is no text and automatically enables it when there is text. The default value is false. |