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

Already on GitHub? Sign in to your account

Extra content in minutes when selecting hours #50

Open
smgladkovskiy opened this Issue Oct 23, 2012 · 6 comments

Comments

Projects
None yet
2 participants

When it set

defaultTime: ''

after selecting hours, extra-content appears instaed of default minutes: "0-1". Occures on main site in part "Timepicker with the Now, Deselect and Close buttons" after deselecting time input.

Owner

fgelinas commented Oct 23, 2012

This should fix it. The same problem occured with hours if you selected only minutes.
Thanks for reporting the bug.

Thanks for quick reply.

With this changes now it is simply do not render results of hours and minutes selection if defaultTime: '' is set as default. Only after closing of popup window...

Owner

fgelinas commented Oct 24, 2012

This is right, it does not render because the other part of the time is not defined yet.
In your case, when the defaultTime is an empty string, what do you expect the parsed time to be if the used only selected the hours?
I think it should either default to 00 minutes or not render at all.

I think that it should work like that:

  1. defaultTime: '' - timepicker input is empty
  2. making some action to call timepicker window
  3. click on hours — in timepicker input appears selected hours and default minutes (00 - or it could be redefined in config options)
  4. click on minutes — in timepicker input appears minutes selection, timepicker window is closing

I think if there is nothing appears in input field while selecting hours and minutes user can lost his action and understanding of what he is doing...

Owner

fgelinas commented Oct 26, 2012

I've thought about it and you are right, it makes more sense to update the input box even if the full time is not defined yet, and it gives a better visual feedback to the user. I'll commit another change this week-end.

Thanks a lot! Looking forward to use fixed logic.
Good weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment