Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd support for more keyboard types #3303
Comments
This comment has been minimized.
This comment has been minimized.
|
For anyone looking for an ever nicer solution for iOS numeric keyboards, check out this new plugin. |
This comment has been minimized.
This comment has been minimized.
|
Looking at the code, the current It would likely cause a breaking change for existing code if these were changed to a number only pad as you request. Therefore, I propose this could be done with a new enum value for What are others thoughts? Or is this feature request no longer required and can be closed off? David |
This comment has been minimized.
This comment has been minimized.
|
@EddyVerbruggen can you please explain how can i get decimal pad on ios. i tried al the steps but not getting success. can you please explain this in a little more detail when i define keyboardType="decimalPad" in tns.html then it gives an error cannot find variable decimalPad but nothing happens it gives the default keyboard. |
This comment has been minimized.
This comment has been minimized.
|
@peerit12 here is a sample Playground that shows a way to access and modify the native property |
This comment has been minimized.
This comment has been minimized.
|
@NickIliev thanks for helping me out with this |
Hi folks,
I'm developing an app where I want the user to be able to enter a PIN code, so only numbers. I thought I'd use the
numberkeyboard type on Android andphoneon iOS. Android is fine, but I wanted to get rid of the characters in the lower left corner on iOS:Since the {N} KeyboardType enum doesn't contain the
numberPadtype I did this ({N}-Angular):Where
Constants.IOS_KEYBOARD_TYPES.numberPadis just a custom property that resolves to 4.This gives me a nice and clean PIN entry keyboard🎉
Note that there's also a sweet
decimalPad, constant value is 8 which renders this keyboard which I'm using for entering fractions (like payments):Wouldn't it be nice if I can use this to achieve the same thing?
Surely these properties are iOS-specific but differentiating between iOS and Android is quite easy in {N}'s views anyway. Or we can tie the
[keyboardType]="keyboardType"to a property of the component. We can also just use the closest Android keyboard so users don't even need to bother specifying that seperaterly.Thanks for considering!
Eddy
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.