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
Calendar::getDate Returns a Date for the current date of the calendar. For month view, it will always be some time between the first and last day of the month.
We can get start date by getView event with intervalStart. We can get end date by getView event with intervalEnd. var month = $('#calendar'). fullCalendar('getView').
With over 10 years of open source and over 120 contributors, FullCalendar will always have a free and open source core.
This is what I used to scroll to the current time in the view :
var scrollTime = moment().format("HH:mm:ss");
$('#calendar').fullCalendar({
now: today,
scrollTime: scrollTime
});
For UX purpose, I rounded down to the nearest hour so user can clearly see where (when) the calendar view is :
var scrollTime = moment().format("HH") + ":00:00";
$('#calendar').fullCalendar({
now: today,
scrollTime: scrollTime
});
Check the fullCalendar scrollTime
parameter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With