diff --git a/Examples/UIExplorer/TextInputExample.js b/Examples/UIExplorer/TextInputExample.js index a52284b85ec11f..1c0362d13db0c3 100644 --- a/Examples/UIExplorer/TextInputExample.js +++ b/Examples/UIExplorer/TextInputExample.js @@ -159,6 +159,65 @@ exports.examples = [ ); } }, + { + title: 'Keyboard type', + render: function() { + return ( + + + + + + + + + + + + + ); + } + }, { title: 'Auto-correct', render: function() { diff --git a/Libraries/Components/TextInput/TextInput.ios.js b/Libraries/Components/TextInput/TextInput.ios.js index 02fec4d5a3a700..9284f935aac1ea 100644 --- a/Libraries/Components/TextInput/TextInput.ios.js +++ b/Libraries/Components/TextInput/TextInput.ios.js @@ -137,8 +137,16 @@ var TextInput = React.createClass({ * Determines which keyboard to open, e.g.`numeric`. */ keyboardType: PropTypes.oneOf([ + 'ascii', 'default', + 'email', + 'numbers-and-punctuation', 'numeric', + 'pin', + 'phone-name', + 'search', + 'twitter', + 'url', ]), /** * If true, the text input can be multiple lines. Default value is false. diff --git a/React/Base/RCTConvert.m b/React/Base/RCTConvert.m index 9bf7104c996b0d..24e2ffe5690ff9 100644 --- a/React/Base/RCTConvert.m +++ b/React/Base/RCTConvert.m @@ -116,8 +116,16 @@ + (NSURLRequest *)NSURLRequest:(id)json }), UIScrollViewKeyboardDismissModeNone, integerValue) RCT_ENUM_CONVERTER(UIKeyboardType, (@{ - @"numeric": @(UIKeyboardTypeDecimalPad), + @"ascii": @(UIKeyboardTypeASCIICapable), @"default": @(UIKeyboardTypeDefault), + @"email": @(UIKeyboardTypeEmailAddress), + @"numbers-and-punctuation": @(UIKeyboardTypeNumbersAndPunctuation), + @"numeric": @(UIKeyboardTypeDecimalPad), + @"pin": @(UIKeyboardTypeNumberPad), + @"phone-name": @(UIKeyboardTypeNamePhonePad), + @"search": @(UIKeyboardTypeWebSearch), + @"twitter": @(UIKeyboardTypeTwitter), + @"url": @(UIKeyboardTypeURL), }), UIKeyboardTypeDefault, integerValue) RCT_ENUM_CONVERTER(UIViewContentMode, (@{