Skip to content

Commit 5389345

Browse files
jordmccordclaude
andcommitted
docs(react-native): document disableManualEntry on DatePickerInput/TimePickerInput
Adds the prop table row for both components (missed in the original PR), plus a note in DatePickerInput's accessibility section. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent d4a4f5a commit 5389345

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

packages/react-native/src/components/DatePickerInput/DatePickerInput.docs.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ When used inside `FormField`, validation, disabled, and required states are inhe
8888
| `format` | `string` | `'DD/MM/YYYY'` | Day.js format string used to render selected dates and parse manual input. Leaving it as `'DD/MM/YYYY'` automatically inserts `/` separators and requests a numeric keypad. |
8989
| `openButtonLabel` | `string` | `'Open date picker'` | Accessible label read by screen readers for the calendar trigger button. |
9090
| `autoCloseOnSelect` | `boolean` | `true` | Closes the picker automatically after a date is chosen. |
91+
| `disableManualEntry` | `boolean` | `false` | Blocks keyboard entry and makes tapping anywhere on the field open the calendar picker, instead of only the trailing button. Independent of `disabled`/`readonly`, which still disable the whole field regardless of this prop. |
9192
| `datePickerProps` | `Omit<DatePickerSingleProps, 'mode' \| 'date' \| 'onChange' \| 'ref'>` | `-` | Forwards props to the underlying `DatePicker` (e.g. `minDate`, `maxDate`, `timeZone`). |
9293
| `onChange` | `(payload: { date: DateType }) => void` | `-` | Fired whenever a valid date is parsed from typing or picked via the calendar. |
9394
| `onClear` | `() => void` | `-` | Called after the clear action resets the input. Also displays a trailing clear button when provided. |
@@ -237,6 +238,7 @@ The `DatePickerInput` component can display a label and helper text by passing t
237238
- The `DD/MM/YYYY` format triggers a numeric keypad on iOS/Android for faster entry.
238239
- On iOS, a contextual **Done** button appears above the keyboard to dismiss it when finished typing.
239240
- Custom formats can be specified to match your application's needs while maintaining accessibility.
241+
- Set `disableManualEntry` to block the keyboard entirely and make tapping anywhere on the field open the calendar picker, useful when only picker-based selection should be allowed.
240242

241243
### Integration with DatePicker
242244

packages/react-native/src/components/TimePickerInput/TimePickerInput.docs.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const BookingTimeField = () => {
8080
| `format` | `string` | `'HH:mm'` | Day.js format string used to render selected times and parse manual input. |
8181
| `openButtonLabel` | `string` | `'Open time picker'` | Accessible label read by screen readers for the time trigger button. |
8282
| `autoCloseOnSelect` | `boolean` | `true` | Closes the picker automatically after a time is chosen. |
83+
| `disableManualEntry` | `boolean` | `false` | Blocks keyboard entry and makes tapping anywhere on the field open the time picker, instead of only the trailing button. Independent of `disabled`/`readonly`, which still disable the whole field regardless of this prop. |
8384
| `timePickerProps` | `Omit<TimePickerProps, 'date' \| 'onChange' \| 'ref'>` | `-` | Forwards props to the underlying `TimePicker` (e.g. `use12Hours`, `timeZone`, `minuteInterval`). |
8485
| `onChange` | `(payload: { date: DateType }) => void` | `-` | Fired whenever a valid time is parsed from typing or picked via the selector. |
8586
| `onClear` | `() => void` | `-` | Called after the clear action resets the input. Also displays a trailing clear button when provided. |

0 commit comments

Comments
 (0)