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

Adding resource when adding event #51

Closed
timd2i opened this issue Oct 22, 2015 · 4 comments
Closed

Adding resource when adding event #51

timd2i opened this issue Oct 22, 2015 · 4 comments

Comments

@timd2i
Copy link

timd2i commented Oct 22, 2015

I add an event bij dragging a period on the calendar.
Then i get a bootstrap modal with start en end date already filled in. Using this code:
select: function(start, end) {
var start = $.fullCalendar.moment(start).format("YYYY-MM-DD HH:mm:ss");
var end = $.fullCalendar.moment(end).format("YYYY-MM-DD HH:mm:ss");
$('#AddEventModal #start').val(start);
$('#AddEventModal #end').val(end);
$('#AddEventModal').modal('show');
},

Is it not possible use the clicked resource?

@arshaw
Copy link
Member

arshaw commented Oct 26, 2015

the resource object should be the last parameter:
http://fullcalendar.io/docs/selection/select_callback/

@arshaw arshaw closed this as completed Oct 26, 2015
@timd2i
Copy link
Author

timd2i commented Nov 5, 2015

I used following code:
select: function(start, end, resource) {alert($.fullCalendar.resource); },

But this gives me "undefined" as alert.

@arshaw
Copy link
Member

arshaw commented Nov 11, 2015

you'll want something more like this:

select: function(start, end, jsEvent, view, resource) {
    alert(resource.id);
},

@arshaw
Copy link
Member

arshaw commented Nov 11, 2015

^ corrected

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