themouette/jquery-week-calendar — Issue #90: businessHours range definition requires 0 to 24 for all day business hours
Author: robotdan
Created: 2011-10-24 17:32:04+00:00
State: open

In order for all 24 hours of the day to be rendered as business hours, you need to define the option as such:

"businessHours": {start: 0, end:24}

If this range is 0 based, I would have expected to define business hours as 0 to 23 hours.

In the follow snippet from jquery.weekcalendar

_renderCalendarBodyEvents: function($calendarTableTbody) {
....
var bhClass = (options.businessHours.start <= i && options.businessHours.end > i) ?
'ui-state-active wc-business-hours' : 'ui-state-default';
...
}

Why isn't this bhClass evaluated like this to include the upper bound.

var bhClass = (options.businessHours.start <= i && options.businessHours.end >= i) ?
'ui-state-active wc-business-hours' : 'ui-state-default';
}

I see that 0 and 24 are used elsewhere - maybe other changes would need to be made in order to support this type of change?

Making this one change in my environment did render all 24 hours as business time, which allowed me to set business hours from 0 to 23 hours.