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

Increment/Decrement Hour arrows can leave the minutes and seconds empty #348

Open
Hilgo opened this issue Aug 30, 2016 · 0 comments
Open

Comments

@Hilgo
Copy link

Hilgo commented Aug 30, 2016

Similar to #194 , but this concerns the minutes and seconds part of the input. When user changes the hour arrows and the input is clear (no value), it sets the hour (can be negative, informed in #194) but not set minutes or seconds, leaving it empty.

In my case, i didn't include any validations to validate this format, with minutes and second empty and the user is saving without minutes but the time in the database is empty. Am i missing some configuration or do I have do validate this format myself? I could do this using a mask on those inputs, forcing the format or i could update the values before submitted, something like this:

$('.timepicker').each(function(){
    $(this).timepicker('setTime', $(this).val());   
});

Or anyone with a better solution? Didn't get a time to debug the bootstrap-timepicker js to see where this behavior is coming to update it and i don't have experience with contributing to other projects in GitHub.

I created a Fiddle to illustrate this behavior. Library versions of this fiddle, provided by cdnjs links:

Tested in Windows 8.1 and browsers:

  • Chrome 52.0
  • Firefox 48.0
  • IE 11 (document mode: edge)

Decided to create a new issue, since its different from #194 and couldn't find this specific issue already reported. Sorry if it was already posted.

And here's a print screen of the input with no values for minutes and seconds, to be more clear to understand.

bootstrap timepicker - increment or decrement hour arrows

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