bootstrap-datetimepicker icon indicating copy to clipboard operation
bootstrap-datetimepicker copied to clipboard

Configuration options for hour/minute/second stepping

Open pascalhein opened this issue 12 years ago • 2 comments

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.

pascalhein avatar Oct 17 '13 15:10 pascalhein

:+1:

Domon avatar Dec 09 '13 09:12 Domon

:+1:

oppara avatar Feb 22 '14 07:02 oppara