jtsage / jtsage-datebox

A multi-mode date and time picker for Bootstrap (3&4), jQueryMobile, Foundation, Bulma, FomanticUI, and UIKit (or others)
http://datebox.jtsage.dev/
Other
474 stars 166 forks source link

No support for selecting seconds #410

Closed slominskir closed 7 years ago

slominskir commented 7 years ago

Enhancement request: allow selecting Hours, Minutes, and Seconds in TimeBox / TimeFlipBox.

slominskir commented 7 years ago

The DurationBox mode can be configured to almost do what we want. If you use the following configuration:

.datebox({mode: "durationbox", overrideSetDurationButtonLabel: "Set Time", overrideDurationLabel: ["Day", "Hour", "Minute", "Second"], overrideDurationFormat: "%Dl:%DM:%DS", overrideDurationOrder: ['h','i', 's']});

jQuery.extend(jQuery.jtsage.datebox.prototype.options, { 'maxDur': 86399 });

You must be okay with 24 hour time mode though. Also the duration mode feature where a field wraps around to the next/previous unit if a limit is reached may not be desired.

jtsage commented 7 years ago

I believe this is sorted now. This version will get pushed out the door later today probably (including to the builder). If something doesn't work as expected, please open another ticket, thanks!