fullcalendar

fullcalendar, how to limit the number of events per day in the month view

痞子三分冷 提交于 2019-11-29 09:58:39
I have many events on a day, and it works as expected but now looking at the month view, my calendar grid is much taller that expected. I'd like to hide some of these events from the month view, like a summary with a visual que that there are more on this day than can be shown. I can use eventRender and return false, but i would like to know how many events are on a given day, so i can limit the rendering to about 4, then perhaps i would add an event that says " more ... " So the question may be : how to count the events on a given date ? or is this more like a feature request to expose a max

Dynamic event template in FullCalendar

牧云@^-^@ 提交于 2019-11-29 09:34:30
问题 Is there any way to dynamically change event template in FullCalendar? Update. What I want is to specify new event html (e. g. in eventRender callback) and make FullCalendar to use it for my event rendering. Something like this: eventRender: function(event, element, view) { var template = '<div class="customEvent"></div>'; return $.parse(template); } Tried the sample above - didn't work. 回答1: The eventRender callback function can modify element, return a brand new DOM element that will be

fullcalendar js: fetching more events with ajax

吃可爱长大的小学妹 提交于 2019-11-29 09:00:02
I'm using fullcalendar , how can I fetch more events from same server side, multiple urls? The initial one works, I just want to add additional events when they arrive(ajax). You could use Ajax to get the data and then add dynamically the new source $.ajax({ url: "test.html", success: function(data){ var source = { events: [ { title: data.getTitle(), start: new Date(year, month, day) } ]}; $('#calendar').fullCalendar( 'addEventSource', source ); } }); If each and every time you are using a different URL, then you can simply use addEventSource with the new URL. If you are attempting to use the

Non-Gregorian Calendar with jQuery FullCalendar

有些话、适合烂在心里 提交于 2019-11-29 08:20:44
Does anyone know how can one add a non-gregorian calendar support to jquery FullCalendar ? For example Persian Calendar (Jalalai or Shamsi calendar). I don't know where to start the customization and what exact classes and scripts are affected by such a feature. I have implemented conversion script in js. I think that there isn't any built-in support. I'm looking for solution so that I myself can implement it myself. Jalali calendar (Persian): 12 month 6 first months are 31 days 5 next months are 30 days The last month is 29 or 30 days based on being leap year. The year starts on first day of

jquery Full Calendar not showing events

廉价感情. 提交于 2019-11-29 07:56:51
I am using asp.net mvc to list the events in the jquery full calendar. Below is the script i am using to list the events through json from mvc. $('#calendar').fullCalendar({ theme: true, editable: true, disableDragging: true, disableResizing: true, header: { left: 'prev,next today', center: 'title', right: 'month,basicWeek,basicDay' }, events: function(start, end, callback) { // do some asynchronous ajax $.getJSON("/User/GetEvents/", { start: dateFormat(start.getTime()), end: dateFormat(end.getTime()) }, function(result) { // then, pass the CalEvent array to the callback callback(result); }) }

FullCalendar date format

爱⌒轻易说出口 提交于 2019-11-29 07:35:26
Want to find the way to change the default date format in FullCalendar. Actually, it is: Tue Aug 13 2013 18:00:00 GMT-0400 (EDT) I want: 2013-08-13 Thanks. For information specific to the FullCalendar, you probably need to see this , which gives you some formating rules. There's some more information here that might be useful. Yet, you can do so with JavaScript directly if you need this date format in an interface between the FullCalendar and other package or your own code: If you want "today", you can (be careful since that'll be client-side): > (new Date()).toISOString().slice(0, 10) '2013

Disable drop on past dates in FullCalendar

我是研究僧i 提交于 2019-11-29 06:59:14
I started using the FullCalendar plugin recently. I am trying to implement a function on dropping events in the calendar. But before saving to the database, I want to check and disable/prevent dropping external events on dates before today. Any idea on how to do this?? I am looking for something like the past days getting greyed-out or something like that so that I can display the events already present as well. Just want to prevent the user from dropping an event on a past date. EDIT: drop: function (date, jsEvent, ui) { if(date<currentDate) { $('#calendar').fullCalendar('removeEvents', event

Fullcalendar - limit selectable to a single day

青春壹個敷衍的年華 提交于 2019-11-29 06:19:39
By default if you enable the 'selectable' attribute it will allow you to click and drag and select several days. I would like to only allow the user to select a single day, not drag over multiple. Is there a way to have 'selectable' enabled, but disable the dragging feature that comes along with it? If you want to limit highlight to a single day in agenda week view you can use following: selectConstraint:{ start: '00:01', end: '23:59', }, if you want to limit the event you can use eventConstraint:{ start: '00:00', end: '24:00', }, in the select callback, adding the following does the trick:

How can I set Fullcalendar options dynamically

不打扰是莪最后的温柔 提交于 2019-11-29 05:56:02
How can I set the minTime and maxTime options after the calendar is created? I tried the following, which doesn't work: $('#calendar').fullCalendar('option', 'minTime', 7); $('#calendar').fullCalendar('render'); the hand of NOD I don't know if it is still relevant but I can change the options with the following statement: example for selectable: $('#calendar').fullCalendar('getView').calendar.options.selectable = false; $('#calendar').fullCalendar('render'); // rerender to see visual changes Though it's not dynamically but at least you don't have to destroy the whole calendar and refetch your

How can I set Fullcalendar options dynamically

被刻印的时光 ゝ 提交于 2019-11-29 05:54:17
How can I set the minTime and maxTime options after the calendar is created? I tried the following, which doesn't work: $('#calendar').fullCalendar('option', 'minTime', 7); $('#calendar').fullCalendar('render'); the hand of NOD I don't know if it is still relevant but I can change the options with the following statement: example for selectable: $('#calendar').fullCalendar('getView').calendar.options.selectable = false; $('#calendar').fullCalendar('render'); // rerender to see visual changes Though it's not dynamically but at least you don't have to destroy the whole calendar and refetch your