Skip to content

Invalid time with steps and now button #192

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

Open
barts2108 opened this issue Jul 4, 2011 · 0 comments
Open

Invalid time with steps and now button #192

barts2108 opened this issue Jul 4, 2011 · 0 comments

Comments

@barts2108
Copy link

Hi,

I just bumped into this page as I need a date+time picker and I am sure going to try this one as it looks great. While playing around with the examples I noticed that the example "Hours, Minutes, Seconds in steps" has some issue with displaying the nearest correct time when pressing the now button

suppose the system time is: 04-july-2011 09:36:54 GMT+1 with daylight saving

When I press the now button, the date time from the time picker is : 04-july-2011 10:40:50, the hour is rounded up, the minutes are rounded up, and the seconds are roundend down. Strictly looking at the steps, this would make sense. However 10:00:00 is the nearest time that matches the steps AND the current system time.

In case the system time is 10:07:54, the now button will make it show 10:10:50 where I expected 10:10:00, as this is closer to the real system time. When rounding down is done e.g. 10:01:30, the closest time would be 10:00:50.

Is this something that can be improved ?

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