views:

119

answers:

2

Simply put, is there a way to have fullcalendar scroll to the current time position in the week view?

If it helps, I'm using Ruby on Rails and jQuery

A: 

Use the today function:

$('#calendar').fullCalendar('today');

theycallmemorty
+1  A: 

Do you mean that you want the calendar to display, automatically centered around the current time of day (of render time)?

Assuming that you are happy that the day columns are always in the same place there is the firstHour option in the agendaWeek view which might work for you.

For illustration, let's assume that the number of hours on the Y-axix in your given view is 10 then something like:

var firstHour = new Date().getUTCHours() - 5;
$('#calendar').fullCalendar({
  firstHour: firstHour;
});

More details on view controls are available here

bjg
Absolutely what I wanted! Don't know how I overlooked this, thanks :)
amr