last day (14 days later) » 

1:09 PM
0
A: Allow only number digits in input type regex. issue is i am able to type this(1.) , want to prevent it

shubham agrawalHere is a code that might help you.In the below code when the user types . it is replaced by null.It only accepts digits.This is for input type="text".The variable currValue has the value of the input. The search() method searches a string for a specified value, and returns the position of th...

 
Yes @ilyaigpetrov right . I already know it works with type=" text" but I want number keyboard.
 
@GopalSingh check my updated answer.Hope it helps
@ilyaigpetrov check my updated answer.I missed that point
@ilyaigpetrov don't know why I am not able to edit right now its giving some error.I will as soon as possible
 
@shubhamagrawal can you please explain the code. when I press + and - key the text got clear.
 
@GopalSingh check the explanation of the code.Hope this helps.For any other doubt feel free to ask.
 
It's clear all input text when I type + or -
 
1:09 PM
No check the updated fiddle its working.Which browser are you using
 
I am using chrome but I will use this code for mobile application.
 
Its working I checked the code even on moblie. I am not sure why are you facing this error.Yesterday only I made sure that it supports all the device
 
@shubhamagrawal it's not working in both (when type + or - ) cases.
 
@GopalSingh check the final snippet.This will work under all the possible cases.Hope this solves the issue.
 
By this, there are many issues like when user enter dot or comma etc before entered text(.2131324 ) its shows focus issue.
 
1:09 PM
@GopalSingh what focus issue are you talking about.Do you want it to loose focus if the input is wrong
Yeah what issue are you facing
 
when I enter 12345 and move cursor to the first position and enter dot or comma etc its moves to 2nd position and again you enter it move to 3rd.
 
I am not facing that issue.Check the fiddle
 
Issue only in mobile devices not on web.
 
I think you should start a bounty on this question.
 
Don't know
 
1:15 PM
What??
Since this question is not accessible to anyone now bounty will be the best way to get best solution.
 
I have one solution which is my question in that there is only one issue it takes dot after any number (Means that can accept dot after the text like 12344.).
 
I think is a bug in input type number and what solution I have provided solves each issue I am sure if you start a bounty you will have your solution by end of the day.On this question there is a option of start a bounty.I think you should consider doing that.
 
Thanks .
 
Atleast consider up voting my answer.
 
bounty option is not available now.
 
1:22 PM
It takes 48 hours.After that you can start.
Bye
 

last day (14 days later) »