Skip to content
This repository was archived by the owner on Dec 15, 2017. It is now read-only.

Configuration options for hour/minute/second stepping #217

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Configuration options for hour/minute/second stepping #217

wants to merge 2 commits into from

Conversation

pascalhein
Copy link

Added the configuration options
hourStep (defaults to 1),
minuteStep (defaults to 1),
secondStep (defaults to 1).
Each of them determines the number of units the arrows will change the hours,
minutes and seconds, respectively. That is, if hourStep is 4 and the time in
the datetimepicker currently has a hour value of 17, clicking on the up arrow
will change that value to 17+4=21, and clicking on the down arrow will change
it to 17-4=13.
This also wraps around 0 and 24, so that decrementing 00:05:00 with a
minuteStep of 6 will give 23:59:00.

Also adjusted three test cases to reflect the new behavior. Those test cases
expected the click to effect a change of 1, which is the default value, but
they now expect a change of the step values given in the setup function.

Added the configuration options
  hourStep (defaults to 1),
  minuteStep (defaults to 1),
  secondStep (defaults to 1).
Each of them determines the number of units the arrows will change the hours,
minutes and seconds, respectively. That is, if hourStep is 4 and the time in
the datetimepicker currently has a hour value of 17, clicking on the up arrow
will change that value to 17+4=21, and clicking on the down arrow will change
it to 17-4=13.
This also wraps around 0 and 24, so that decrementing 00:05:00 with a
minuteStep of 6 will give 23:59:00.

Also adjusted three test cases to reflect the new behavior. Those test cases
expected the click to effect a change of 1, which is the default value, but
they now expect a change of the step values given in the setup function.
@Domon
Copy link

Domon commented Dec 9, 2013

👍

1 similar comment
@oppara
Copy link

oppara commented Feb 22, 2014

👍

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

Successfully merging this pull request may close these issues.

3 participants