Example · Features
Smooth Hour Snap
Enable fluid hour dragging with smooth snapping animation
Smooth Hour Dragging
Drag the clock hand smoothly between hours (like minutes), with animated snap on release:
index.tstypescript
1const picker = new TimepickerUI(input, {2 clock: { smoothHourSnap: true }3});4picker.create();
With 24h Format
Works perfectly with 24-hour clock format:
index.tstypescript
1const picker = new TimepickerUI(input, {2 clock: {3 type: '24h',4 smoothHourSnap: true5 }6});7picker.create();
With Increments
Combine with hour increments for flexible selection:
index.tstypescript
1const picker = new TimepickerUI(input, {2 clock: {3 incrementHours: 2,4 smoothHourSnap: true5 }6});7picker.create();
Comparison: Default vs Smooth
Default (Discrete)
Clock hand jumps directly to each hour
index.tstypescript
1const picker = new TimepickerUI(input, {2 clock: { smoothHourSnap: false }3});4picker.create();
Smooth Hour Snap
Clock hand drags fluidly, snaps on release
index.tstypescript
1const picker = new TimepickerUI(input, {2 clock: { smoothHourSnap: true }3});4picker.create();