4/6/2022»»Wednesday

Fullcalendar Allday Slot Height

4/6/2022
  • I think that it would be great, if fullcalendar could adapt automatically depending on the number of slots per day. For instance, in the example above, by knowing that there are two slots per day, the slot height could be PREDEFINEDDAYHEIGHT / 2.
  • Give the user the ability to select multiple dates or time slots with their mouse or touch device. You can use this piece of code in v1.x $('#calendar').fullCalendar( dayClick: function (date, allDay, jsEvent, view) $(.

I am developing a webapp and am using jQuery fullcalendar plugin.

I need to somehow disable certain time-slots.

I have a FullCalendar with a TimeGridWeek view. Each time slot has a height of about 20 pixels. When I change the slotDuration from 00:30:00 to 00:15:00, the height of each slot stay the same.

The current method I am using is to add events for the time-slots I want to disable and disallow event overlapping.

SlotFullcalendar Allday Slot Height

Is there a better way to do this? I rather not disallow event overlapping.

I can live with the solution for the above problem: adding black timeslots and disallow the adding of timeslots in those areas.

Nevertheless I have a more pressing problem. I need to be able to change the background color of slots for certain time ranges. Ideally I would be using this in the same way as the eventSources; just point to an url and send the to be colored ranges back with ajax/json.

The bounty I am about to add is for this last problem (colourized slot ranges, as well in day and week view). If someone can suggest me to another solution then full calendar that can do this, that’s also fine.

Answers:
Questions:

Using Fullcalender, in my code I have something like this:

The above code is a compilation of parts of a plugin I made, so it might not work directly. Feel free to contact me.

Answers:

I finally got this available slots to work per days.

adjustment of koosvdkolk’s answer to have different available slots per days:

now just call:

and dont forget css classes:

Answers:

This thread in google code allows to follow the evolution of this kind of issue. Actually it’s about busyness hours colors, but it is directly linked

Also this guy has implemented a very handy way to manage this purpose still using fullcalendar with this kind of code

Check the screenshot

Answers:

Fullcalendar has a builtin function businessHours which emphasizes certain time slots on the calendar.

Answers:

I found a solution by using another calendar: jquery-week-calendar ( https://github.com/themouette/jquery-week-calendar ).

Heights

This calendar has a feature called Freebusy. It’s ment to be used to have busy and free timeslot ranges, but by altering the source code a bit, I am able to add background colors to timeslot ranges. I changed the method freeBusyRender as follows:

Then, I can initialize the calendar as follows:

which gives me following result:

I bet this can be improved; I think I broke the freeBusy feature doing this, but I don’t need it.

Answers:

There is another much more developed and supported calendar type plugin from dhtmlx called the scheduler here: http://dhtmlx.com/docs/products/dhtmlxScheduler/

It supports disabling of timeslots, background colours, and much more. I’ve used it before and found it offers everything I needed.

Tags: jquery, time

Estoy usando fullcalendar para crear un calendar donde mi usuario puede indicar sus disponibilidades. He configurado el calendar para que haya allDaySlots disponibles. Aparecen correctamente en el calendar, pero no puedo seleccionarlos. ¿Hay algo especial que especificar en la callback selectiva?

¿También es posible configurar calendar completo para que cuando el usuario select allDaySlot, toda la fila correspondiente a ese día aparezca como seleccionada?

He hecho una jsfiddle aquí

Este fragment aquí:

está causando una anulación de selección inmediata en events de todo el día, ya que la condición mEnd > mStart siempre es cierta para ellos.

Fullcalendar Allday Slot Heights

si cambias a

los events de todo el día se renderizan correctamente. title es obligatorio, así que agregué esto.

Otro enfoque sería establecer la duración del evento pnetworkingeterminado en 0 pero no lo he probado, consulte aquí http://fullcalendar.io/docs/event_data/defaultAllDayEventDuration/

EDITAR

Fullcalendar All Day Slot Height

eche un vistazo a este violín: http://jsfiddle.net/xaLzo7g6/3/

Múltiples cosas:

Fullcalendar Allday Slot Height Weight

  • los events de momento son mutables, por lo tanto, es necesario clonar antes de modificarlos
  • la zona horaria se configuró en 'local' mientras que el momento es UTC, lo que resultó en un turno de 2 horas al día siguiente en todos los events. Al establecer eso en 'UTC' se corrigió la superposition al día siguiente
  • la lógica de deseleccionar se eliminó por completo, ya que es innecesario

desde mi punto de vista, ahora se comporta como se desea: hacer clic en una ranura de todo el día o seleccionar cualquier marco de time siempre 'selecciona' todo el día y lo bloquea