Made Arya Agung
Made Arya Agung

Reputation: 31

how to use and implement fullcalendar in grails?

I have a problem when I want to implement fullcalendar in Grails, the documentation here : http://grails.org/plugin/full-calendar is not very complete I think..

Where should I keep/save this :

<fullcal:calendar id="cal">
    header: { left: "", center: "", right: "prev, today, next" },
    columnFormat: { week: 'ddd d/M' },
    timeFormat: 'HH:mm{ - HH:mm}'
</fullcal:calendar>

Anybody can tell me step by step? thanks :)

Upvotes: 0

Views: 749

Answers (1)

Daniel Wondyifraw
Daniel Wondyifraw

Reputation: 7723

grails install-plugin full-calendar

1.import jquery on your gsp.

Call this plugin and tag fullcalander in your gsp as follow:

<fullcal:resources/> // you don't need settings inside we will use jquery below 

the prepare and set values you want using jquery or using tag later see on 2

$('#calendar').fullCalendar({
    // put your options and callbacks here
 weekends: false // will hide Saturdays and Sundays
})

});

2. forget the document ready setting on the above calander.fullCalnder setting and put this inside the gsp tag

    <fullcal:calendar id="cal">
    header: { left: "", center: "", right: "prev, today, next" },
    columnFormat: { week: 'ddd d/M' },
    timeFormat: 'HH:mm{ - HH:mm}'
    </fullcal:calendar>

3 .See the post using chrome inspect or debug to am sure you will have a date varible on your

   params.cal

Upvotes: 0

Related Questions