Skip to content

Latest commit

 

History

History
61 lines (39 loc) · 1.75 KB

File metadata and controls

61 lines (39 loc) · 1.75 KB

cordova-plugin-character-keyboard-wkwebview

Cordova plugin to show decimal or dash key on the iOS keyboard.

Taken from mrchandoo's repo cordova-plugin-decimal-keyboard and merged with ericdesa WKWebView fix into cordova-plugin-decimal-keyboard and further modified before being checked into this repo.

Install

cordova plugin add --save https://github.com/hvaughan3/cordova-plugin-character-keyboard-wkwebview

Decimal Usage

<input type="text" pattern="[0-9]*" decimal="true">

Input type number will not work, try to use text with [0-9] pattern instead.

Multiple decimals

<input type="text" pattern="[0-9]*" decimal="true" allow-multiple-decimals="true">

Different decimal character

<input type="text" pattern="[0-9]*" decimal="true" allow-multiple-decimals="false" decimal-char=",">

If you want to localize decimal character, you can change using decimal-char attribute

Dash Usage

<input type="text" pattern="[0-9]*" dash="true">

Input type number will not work, try to use text with [0-9] pattern instead.

Multiple dashes

<input type="text" pattern="[0-9]*" dash="true" allow-multiple-dashes="true">

Different dash character

<input type="text" pattern="[0-9]*" dash="true" allow-multiple-dashes="false" dash-char=",">

If you want to localize dash character, you can change using dash-char attribute

Known Issues

  • Does not handle screen rotation.

License

This project is licensed under the MIT License - see the LICENSE file for details