fullcalendargwtbootstrap3

GwtBootstrap3 FullCalendar


  1. Is it possible to disable header for FullCalendar in GwtBoostrap3 ? When I use

    Header headerDisabled = new Header(); headerDisabled.setNoHeader(); GeneralDisplay gd = new GeneralDisplay(); gd.setHeader(header);

then the header is still displayed :( I also tried

CalendarConfig config = new CalendarConfig(headerDisabled);

it didnt work.

  1. I implemented the Method public void dayRender(JavaScriptObject javaScriptObject, Element element) in

    gd.setViewRenderCallback(new ViewRenderCallback()

but this method is never called. I would like to update the height of the cells. Any idea how can I do it else?

thank you for your help


Solution

  • Ok, i found how to workaround.

    First, it seems this is a bug of FullCalendar Header which setting null instead of false when calling setNoHeader();.

    The workaround :

    Create your custom header :

    public class MyHeader extends Header {
        @Override
        public native void setNoHeader() /*-{
            var theInstance = this;
            theInstance.@org.gwtbootstrap3.extras.fullcalendar.client.ui.Header::header = false;
        }-*/;
    }
    

    And build your FullCalendar :

    MyHeader header = new MyHeader();
    header.setNoHeader();
    CalendarConfig conf = new CalendarConfig(header);
    FullCalendar c = new FullCalendar("toto", ViewOption.agendaDay, conf, true);
    

    Hope it helps ;)