Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS API example #17

Open
dkre opened this issue Nov 19, 2016 · 2 comments
Open

JS API example #17

dkre opened this issue Nov 19, 2016 · 2 comments

Comments

@dkre
Copy link

dkre commented Nov 19, 2016

Hi Dakala,

Really appreciate the work you've done with this module port, it's made D8 calendar creation a breeze.

I'm hoping you can help me with a bit of guidance on how to create a js api plugin. I've used the api example and looked at the example used by fullcalendar_options but I still can't get any option to be applied or get a custom function to be used (specifically I'm looking to use jQuery date picker as a gotoDate and date range filter).

Here's a non-working example:

`(function($) {

Drupal.fullcalendar.plugins.mymodule = {

options: function (fullcalendar) {
var settings = Drupal.settings.fullcalendar[fullcalendar.dom_id].mymodule;
var options = $.extend(
{
header: {
left: 'title',
center: '',
right: 'today prev,next'
},
},
settings
);
return options;
},
};

}(jQuery));`

Any help you can provide would be greatly appreciated.

@dakala
Copy link
Owner

dakala commented Nov 20, 2016

Thanks for this but we're still working on a port of the main module to Drupal 8 and Fullcalendar 3.x. It might take a while for this.

@dkre
Copy link
Author

dkre commented Nov 21, 2016

No worries at all.

If it helps for future development- the plugin settings are passed to library.js (Drupal.fullcalendar.plugins) but the settings aren't used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants