thekingsimo / jquery-week-calendar

Automatically exported from code.google.com/p/jquery-week-calendar
0 stars 0 forks source link

scrollToHourValue Enhancement #106

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
We've found it useful to show all hours but limit the physical size of the
calender to business hours and then auto-scroll to the first of the day. 
The following small enhancement makes this really simple:

Add the following to the list of options

scrollToHourValue : false

Change the following line in _init:

self._scrollToHour(self.options.scrollToHourValue ||
self.options.date.getHours());

Then you can change your initialization to scroll to a particular hour by
passing in the following option:

scrollToHourValue: 9 // auto-scroll to 8AM

I'm not sold on the name scrollToHourValue but it fit in with
scrollToHourMillis

Thanks,

Nathan

Original issue reported on code.google.com by nathanwp...@gmail.com on 24 Nov 2009 at 4:34