timepicker-ui
4.7.0GitHub
timepicker-ui
Features / Smooth Hour Snap

Smooth Hour Snap

Fluid hour dragging with a snap animation on release. Set clock.discreteHourJump to make the hand jump from hour to hour instead.

Smooth Hour Dragging

#

Drag the clock hand smoothly between hours (like minutes), with animated snap on release:

const picker = new TimepickerUI(input, {
clock: { discreteHourJump: false } // This is the default
});
picker.create();

With 24h Format

#

Works perfectly with 24-hour clock format:

const picker = new TimepickerUI(input, {
clock: {
type: '24h',
discreteHourJump: false
}
});
picker.create();

With Increments

#

Combine with hour increments for flexible selection:

const picker = new TimepickerUI(input, {
clock: {
incrementHours: 2,
discreteHourJump: false
}
});
picker.create();

Comparison: Discrete vs Smooth

#

Discrete

Clock hand jumps directly to each hour

const picker = new TimepickerUI(input, {
clock: { discreteHourJump: true }
});
picker.create();

Smooth Hour Snap (Default)

Clock hand drags fluidly, snaps on release

const picker = new TimepickerUI(input, {
clock: { discreteHourJump: false }
});
picker.create();
Esc