diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts b/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts index 1481407efee..c1a2a882f94 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts @@ -255,6 +255,9 @@ export interface TextInputIOSProps { * - `'birthdateDay'` (iOS 17+) * - `'birthdateMonth'` (iOS 17+) * - `'birthdateYear'` (iOS 17+) + * - `'dateTime'` (iOS 15+) + * - `'flightNumber'` (iOS 15+) + * - `'shipmentTrackingNumber'` (iOS 15+) * */ textContentType?: @@ -299,6 +302,9 @@ export interface TextInputIOSProps { | 'birthdateDay' | 'birthdateMonth' | 'birthdateYear' + | 'dateTime' + | 'flightNumber' + | 'shipmentTrackingNumber' | undefined; /** diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.flow.js b/packages/react-native/Libraries/Components/TextInput/TextInput.flow.js index e8126e12201..517ccb7c1f7 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.flow.js +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.flow.js @@ -198,7 +198,10 @@ export type TextContentType = | 'birthdate' | 'birthdateDay' | 'birthdateMonth' - | 'birthdateYear'; + | 'birthdateYear' + | 'dateTime' + | 'flightNumber' + | 'shipmentTrackingNumber'; export type enterKeyHintType = | 'enter' diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.js b/packages/react-native/Libraries/Components/TextInput/TextInput.js index bbeaf8fa53d..684fce0e054 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.js +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.js @@ -238,7 +238,10 @@ export type TextContentType = | 'birthdate' | 'birthdateDay' | 'birthdateMonth' - | 'birthdateYear'; + | 'birthdateYear' + | 'dateTime' + | 'flightNumber' + | 'shipmentTrackingNumber'; export type enterKeyHintType = // Cross Platform diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap index 9d1d69682d4..a6116afa8c7 100644 --- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap +++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap @@ -2899,7 +2899,10 @@ export type TextContentType = | \\"birthdate\\" | \\"birthdateDay\\" | \\"birthdateMonth\\" - | \\"birthdateYear\\"; + | \\"birthdateYear\\" + | \\"dateTime\\" + | \\"flightNumber\\" + | \\"shipmentTrackingNumber\\"; export type enterKeyHintType = | \\"enter\\" | \\"done\\" @@ -3252,7 +3255,10 @@ export type TextContentType = | \\"birthdate\\" | \\"birthdateDay\\" | \\"birthdateMonth\\" - | \\"birthdateYear\\"; + | \\"birthdateYear\\" + | \\"dateTime\\" + | \\"flightNumber\\" + | \\"shipmentTrackingNumber\\"; export type enterKeyHintType = | \\"done\\" | \\"go\\" diff --git a/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js b/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js index d13359827a5..30b8a5dc815 100644 --- a/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js +++ b/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js @@ -783,6 +783,15 @@ const textInputExamples: Array = [ + + + + + + + + + ); },