magnusjt / schedulerjs

jQuery schedule time picker plugin
MIT License
61 stars 16 forks source link

Force selector to select only steps hours. #6

Open milacay opened 6 years ago

milacay commented 6 years ago

I really like your plugin module. Thank you for this module. Currently, I have the steps for the interval of every 1/2 hr, example: 08:00, 08:30, 9:00, 9:30... so on. Is there a way to force the selector to select only those hours specified, 30 minutes interval? For example, user drags the mouse between 8:00 to 8:47, it will force to select from 8:00 to 9:00.

magnusjt commented 6 years ago

Try setting snapTo: 30 in the options. It should force the selection to the nearest half hour.