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

Handling of invalid input is missing #10

Closed
ova2 opened this issue Jul 17, 2011 · 2 comments
Closed

Handling of invalid input is missing #10

ova2 opened this issue Jul 17, 2011 · 2 comments

Comments

@ova2
Copy link

ova2 commented Jul 17, 2011

Hello,

I miss a handling for invalid input. Assume, we have set minutes interval to 15 min. I'm not sure how an invalid input should be handled in this case if user input something manually and left the field then (onblur event). I would say, the old (prev. input value) should stay then. Assume I had 02:45 and input 02:53. Then

02:53 -> 02:45

But what is if we want to round up / down the last input value (real business case in my web application). So that

02:53 -> 03:00

May be we can configure this behavior by options. I propose two new options:

round = true / false (default is false)
roundMinutesStep = 15

Can your add this feature to the timepicker please? Thanks a lot in advance!

@ova2
Copy link
Author

ova2 commented Jul 17, 2011

By the way. I found that you can input any wrong value into the input field. That's very strange. Wrong values should not be accepted in my opinion. Similar to this timepicker http://haineault.com/media/jquery/ui-timepickr/page/ Another option would be the using of keyfilter plugin http://akzhan.github.com/jquery-keyfilter/ You could generate a regular expression from options (minute interval, etc.) and check the input value on blur event.

@ova2
Copy link
Author

ova2 commented Jul 17, 2011

I'm not sure now if we need this feature at all. Web application normally checks input values after the form submit. Real time checking on leaving the field is a nice to have feature, but not must to have.

@ova2 ova2 closed this as completed Jul 17, 2011
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

1 participant