Fullcalendar Allday Slot Height
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?
- Fullcalendar Allday Slot Heights
- Fullcalendar Allday Slot Height Weight
- Fullcalendar All Day Slot Height
Questions: I am developing a webapp and am using jQuery fullcalendar plugin. I need to somehow disable certain time-slots. The current method I am using is to add events for the time-slots I want to disable and disallow event overlapping. 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. 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. The sample project uses FullCalendar v1.6.3 the download I used in my own code is FullCalendar v3.0.0 (I installed it through Nuget package manager in Visual Studio) and a few things have changed. Fullcalendar no longer uses the UnixTimestamp so controllers which use the url generated by the events callback need Datetime parameters rather than.
Fullcalendar Allday Slot Heights
¿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.
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
eche un vistazo a este violín: http://jsfiddle.net/xaLzo7g6/3/
Múltiples cosas:
- 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
I am developing a webapp and am using jQuery fullcalendar plugin.
I need to somehow disable certain time-slots.
The current method I am using is to add events for the time-slots I want to disable and disallow event overlapping.
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.
Fullcalendar Allday Slot Height Weight
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.
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:
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
Fullcalendar has a builtin function businessHours
which emphasizes certain time slots on the calendar.
I found a solution by using another calendar: jquery-week-calendar ( https://github.com/themouette/jquery-week-calendar ).
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.
Fullcalendar All Day Slot Height
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