Let’s say I have a JSON set of events, each with a start time and end time, and I need to make a function that will give me a set of time ranges that do not conflict with this. So let’s say the set contains 0800-0845, 1200-1230, 1140-1240, 1430-1530, etc. How would I grey out these times in this widget http://fgelinas.com/code/timepicker/ using the OnHourShow and OnMinuteShow callbacks? Currently I just have it use the OnSelect event to check against the server using sql queries, but this obviously will scale extremely poorly, and is pretty unfriendly to the user, so I am investigating other solutions. I just need a nudge in the right direction, I just have no idea where to start on this to be quite honest.
Share
You should store your json values in a javascript variable, and then check against that variable in the onHourShow callback.