marw
marw

Reputation: 3119

Change agenda hour from 6 am to 6 am tomorrow

I am trying to set FullCalendar so it shows hours from 6am to 6am the next day. I can set minTime=6, but what should I put as maxTime? Thanks!

This is the full code:

<script>
$(document).ready(function() {
$.ajax({
  url: "/getfullcalendar",
  cache: false
})
  .done(function( retevents ) {
      var retevents = retevents;
      $('#fullcalendar').fullCalendar({
        header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,agendaDay,listWeek',
            },
        firstDay: 1,
        defaultView: 'agendaDay',
        navLinks: true,
        minTime: "06:00:00",

       // What to put here
       // for the same time tomorrow (6am)? 
        maxTime: "24:00:00",

        height: 'auto',
        events: retevents,

    });
    });
});    
</script>

Upvotes: 0

Views: 179

Answers (2)

hud.
hud.

Reputation: 190

maxTime: "30:00:00"

24 hours + 6 hours for the next day

Upvotes: 1

ruby_newbie
ruby_newbie

Reputation: 3285

It looks like you can use the

allDaySlot: true

option. https://fullcalendar.io/docs/agenda/allDaySlot/

Upvotes: 0

Related Questions