I want to show single event on my calendar at time.i am using full calendar plug-in and view more plug-in.i called the event limitEvent(1).But it doesn't showing event if my event is long.For example my event is from Friday to next week Thursday.event is showing on Friday ,Saturday,Sunday. Event is not visible from Monday to Thursday.i am using view more button.But if I use limitEvent(2) it is showing proper format with 2 events+ view more button.Please help me on this I am using 1.5 full calendar plug-in
You need to specify the event limit.
$('#calendar').fullCalendar({
header: {
right: 'prev,next',
left: 'title'
},
eventLimit: 2,// limit 2 row entry only
});
Related
I am using Asp.net Webforms and FullCalendar library. The client side works as expected. I have added a submit button to the calendar. On submit, i want to get all the changed or added events from the calendar and post them to database. Clientevents gets all events of the calendar, however i want to get only the changes between the calendar and datasource. Can you please help me?
Possible duplicate of How to send only updated events as json to server on fullcalendar?
You can include your own field on event object (like isNew / isUpdated) and filter the events by that field when you collect all events.
eventData = {
title: title,
start: start,
end: end,
isNew: true, //your own field
isUpdated: true, //your own field
};
var eventsFromCalendar = $('#calendar').fullCalendar('clientEvents', function (event) {
return event.isNew == true;
});
How can i get the event end date using eventClick, we already tried to use view.end but it gives different date and the event.end doesn't exist.
we are planning to edit the event using a modal and populate the input box when eventclick.
Thank you
sample code
eventClick: function(event, jsEvent, view){
console.log(moment(event.end).format("MM/DD/YYYY"));
}
the event is working when you view it on the calendar, the start and end date is set.
I'm trying to keep my Ckeditor 4 toolbar buttons to a minimum, but want figure out what buttons the users are using most.As such, I'm trying to add google analytics to toolbar button clicks.
Firing off a JS event to record the analytic is no problem. However, I'm having a hard time figuring out how to capture the click event of the toolbar item specifically. Is there an event callback I can bind to? Thanks.
Ideally, this does not have to use the jquery ckeditor connector as I have managed to not use that yet. Although, it is ok to use Jquery itself.
I think I figured it out. There appears to not be a way to do this at the CKEDITOR class level, however it can be done at the individual editor level.
Inside of my instanceReady handler, I can add afterCommandExec event handler.
CKEDITOR.on('instanceReady', function (e) {
var textarea_id, editor;
textarea_id = e.editor.name;
editor = CKEDITOR.instances[textarea_id];
// Attach handler for events
editor.on('afterCommandExec', function (evt) {
// Record Analytic of toolbar bar & keypress events
// See http://docs.ckeditor.com/#!/api/CKEDITOR.command-property-state for vals
var cmd_name, cmd_prev_state, cmd_new_state;
cmd_name = evt.data.name;
cmd_prev_state = evt.data.command.state;
cmd_new_state = evt.data.command.previousState;
console.log([cmd_name, cmd_prev_state, cmd_new_state]);
// Call analytics event next ...
});
})
References:
Event callbacks for the global CKEDITOR level: http://docs.ckeditor.com/#!/api/CKEDITOR-event-instanceReady
Event callbacks for the editor instance level: http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-afterCommandExec
I am using fullcalendar and I am not using event source, I render all the events by using renderEvent method like following:
$('#calendar').fullCalendar('renderEvent', {
id: obj.Id,
title: obj.Title,
start: obj.Start,
end: obj.End,
text: obj.Text,
className: "custom" + colorIndex,
allDay: obj.AllDay,
userId: obj.userId
});
But the problem is, like I rendered 5 events in Mar.2011, they are all displayed OK. And then I navigate to Feb.2011 and back, all the 5 events are disappeared.
Does it mean that if I render the events like this, I have to render the events everytime the view is changed?
Best Regards.
Larry.
you gotta use the stick parameter of the renderEvent function
http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/
I tried last night.
If I use event source then the problem is solved.
It seems that if I render the event one by one. They are not kept through view changing.
An issue i faced while using the select was:
When I click on the date in the month view, the function as specified in the select: function(start, end, allDay) {etc code i want to run here } is immediately fired before changing the view.
I am trying to achieve the following:
1) User clicks on a date on the month view
2) user gets sent to the agendaDay view on the date that he clicked via dayclick() and changeView and gotoDate.
3) User uses select to select time slots.
4) fire up the code i want to run.
Any advice is much sppreciated.
Regards,
Han
version 1.4.7 added support for a "View Option Hash" for the selectable option, so something like this:
$('#calendar').fullCalendar({
selectable: {
month: false,
agenda: true
}
});