To implement the numeric keypad in monaca (you want to enter a decimal number using ".")

Asked 2 years ago, Updated 2 years ago, 90 views

Is there no other way but to make my own numeric keypad?

in input
type="tel" pattern="\d+(\.\d*)?"

Then, *;, appears with a numeric keypad that you can enter, but you cannot enter dots.
What should I do?

http://forum.ionicframework.com/t/showing-decimal-point-and-negative-sign-in-numeric-keyboard/13488/4

monaca cordova

2022-09-29 22:14

1 Answers

Yes, if you are particular about the layout of the input, you have to make your own.
What you're imagining is a 3x4 input form, right?

The type="tel" mentioned in the question can only be a string related to the phone number.
(*Number, *#+)
Also, I think that the layout will be different from the expected one in type="number".
It will be difficult to control only with INPUT.

Also, we have added elements of pattern, but
It does not guarantee input values.
pattern can also be entered with restrictions.
I don't use it because I can't rely on it.
(But I can't find a use for it.)


2022-09-29 22:14

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.