Skip to content

exxbrain/cordova-plugin-decimal-key

 
 

Repository files navigation

Install

cordova plugin add --save cordova-plugin-decimal-key

NPM

This cordova plugin has been built for showing up a decimal keyboard on iOS devices. It supports light and dark themes.

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

Different button character

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

If you want to use another character for button, you can change it using button-char attribute

Known Issues

  • Does not handle screen rotation.

License

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

About

Cordova plugin to show decimal keyboard on iOS devices

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 70.0%
  • JavaScript 30.0%