简体   繁体   中英

Input type for iOS numpad keyboard with comma

I know this is an old question.. but I can't find any valid answer.

I need to trigger the numpad on iOS device with comma, the keyboard type is UIKeyboardTypeDecimalPad , you can see it here:

在此处输入图片说明

I need to trigger it with an HTML input element , is it possible?

For reference, here are some older questions without a solution:

question1

question2

question3

EDIT: It seems that nobody has understood, the problem is to show this keyboard with an HTML input field , not with native code (also, the problem is not about comma or dot ). So the right question should be, is there an html markup which shows up this keybaord on iOS ?

The project is Cordova based.

. and , are culture specific. If you set region as Germany from iphone settings you can see ',' on keypad of type UIKeyboardTypeDecimalPad. If you want to show ',' in all region and languages you need to add it in accessory view of keypad. Not sure how it will be implemented in your case but in Xamarin we did this by adding native rendered for keyboard.

If you want that, for all contexts, the point separator to be replaced by a comma separator, I suggest to modify the CFBundleLocalizations key in Info*.plist with fr_FR (or any other localization for who the float separator is a ',').

For Cordova that you seem to use, I suggest the use of a bespoke plugin, see https://stackoverflow.com/a/46405401/2728710

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM