jquery-week-calendar icon indicating copy to clipboard operation
jquery-week-calendar copied to clipboard

Y axis displayed times

Open thorst opened this issue 13 years ago • 1 comments

From: http://groups.google.com/group/jquery-week-calendar/browse_thread/thread/8bf558926517e246 and http://groups.google.com/group/jquery-week-calendar/browse_thread/thread/3f6cbf80b185c0df

I personally would like to be able to add 30 minute intervals in addition to hourly intervals. 12:00a 12:30a 01:00a 01:30a ...

After i posted my question in the Google groups another user suggested maybe an array of labels for the slots. I think his would be harder since not only are they not a similar design to whats there, they aren't consistent:

07:30 08:20 09:20 10:10 11:10 12:00

Either way i think both features could be valuable additions. I did some research and it looks like the times are generated in _renderCalendarBodyEvents specifically

for (var i = start; i < end; i++) {
  var bhClass = (options.businessHours.start <= i && options.businessHours.end > i) ? 'ui-state-active wc-business-hours' : 'ui-state-default';
  renderRow += '<div class=\"wc-hour-header ' + bhClass + '\">';
  if (options.use24Hour) {
    renderRow += '<div class=\"wc-time-header-cell\">' + self._24HourForIndex(i) + '</div>';
  }
  else {
    renderRow += '<div class=\"wc-time-header-cell\">' + self._hourForIndex(i) + '<span class=\"wc-am-pm\">' + self._amOrPm(i) + '</span></div>';
  }
  renderRow += '</div>';
}

Any help on getting (my request specifically) implemented would be appreciated. Todd

thorst avatar Jan 19 '12 16:01 thorst

I hacked the fix for mine. At around line 1000 i now have. This would be in place of the else, in my previous post. Obvious issues are that its not dynamic height, It would only work for me (and not the other fellows request),

renderRow += '<div class=\"wc-time-header-cell\">' + self._hourForIndex(i) + ':00<span class=\"wc-am-pm\">' + self._amOrPm(i) + '</span><div style="margin-top:40px;">'+ self._hourForIndex(i) + ':30<span class=\"wc-am-pm\">' + self._amOrPm(i) + '</span></div></div>';

thorst avatar Jan 19 '12 20:01 thorst