romant
1
Trying to use any of the fullcalendar
packages and for all the options
.
specification
can be passed within the template as:
{{> fullcalendar id="calendar" calendarOptions }}
Then defined in the helpers
as :
calendarOptions: function ()
{
return {
defaultView: 'basicWeek',
firstDay: 1
};
}
##error
Unfortunately with Meteor 1.2.1
it’s spitting out :
Can't have a non-keyword argument after a keyword argument
Am trying to avoid having to push all the options into the template definition itself.
I realise this sounds like a basic error, so please be gentle with me
Any help is much appreciated.
Thank you.
seeekr
2
How about…
{{> fullcalendar id="calendar" calendarOptions=calendarOptions }}
EDIT: I’m not familiar at all what fullcalendar
is and what it expects you to give it.
shock
3
and id/class inside options helper object is not working ?
romant
4
thanks @seeekr. Tried that already; unfortunately no love either.
romant
5
@shock - sorry - can you elaborate please. As I’ve also tried the following within the onRendered
function :
$('#calendar').fullCalendar(
{
defaultView: 'basicWeek'
}
or are you referring to wrapping the existing helper’s return somehow?
Thank you.
shock
6
calendarOptions: function ()
{
return {
id: 'calendar',
defaultView: 'basicWeek',
firstDay: 1
};
}
I was thinking more like this
romant
7
just tried as part of the helpers
. Same error
romant
8
Bah!
Rookie error.
I used
{{> fullcalendar id="calendar" options }}
instead of
{{> fullcalendar options }}
By supplying only a single argument, and compartmentalizing everything into it; works a treat.
Apologies for raising an alarm