Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there an elegant way to disallow zero in numericInput ? #631

Closed
pssguy opened this issue Oct 23, 2014 · 2 comments
Closed

Is there an elegant way to disallow zero in numericInput ? #631

pssguy opened this issue Oct 23, 2014 · 2 comments

Comments

@pssguy
Copy link

pssguy commented Oct 23, 2014

I have a range of values say -2,-1,+1,+2 I would like the user to have the option to enter. However, zero is not one of them. I could produce an error when 0 is entered or have just have positive numbers and a radio button which could be set to -ve but would prefer something like a zeroAllowed = TRUE parameter in the function

@pssguy pssguy changed the title IIs there an elegant way to disallow zero in numericInput Is there an elegant way to disallow zero in numericInput ? Oct 23, 2014
@wch
Copy link
Collaborator

wch commented Nov 26, 2014

Right now you can validate the input on the server side. In order to do it on the client side, you'd need to write some custom Javascript code to do it - perhaps something like this: http://stackoverflow.com/questions/895659/how-do-i-block-or-restrict-special-characters-from-input-fields-with-jquery

@wch wch closed this as completed Nov 26, 2014
@pssguy
Copy link
Author

pssguy commented Nov 26, 2014

Thanks. I'll check it out. As I'm on a run, any chance of revisiting #174!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants