I'm working a medical scheduler made in Fullcalendar.Js plugin. I'm trying to set the next visual detail:
I've got the default hour format for each row in this sample image:
Is there any format type not only shows the o'clock hour by default, but also shows the respective hour for each row? i.e. 5 pm; 5:20 pm; 5:40 pm, etc.
I need something like this:
To get that effect you need to set the slotDuration to a smaller value, e.g.
slotDuration: "00:40"
See this example: http://jsfiddle.net/sbxpv25p/64/
Docs: https://fullcalendar.io/docs/agenda/slotDuration/
Related
I am using fullcalendar.io and I realized that if I create a new event in the month view, dragging across one or more days, it returns a timestamp for the end date which is later rendered as 12 am of the day after while it should be logic that a function date("what-ever-format", timestamp) returns 12 pm of the current day, or, in any case, not the following day.
Any idea how to fix this???
may I ask and need your help also. I am using a full calendar plugin latest version of v3.8.0. I create an event which is the start date is 2018-01-16 23:59:00 and the end date is 2018-01-17 08:00:00 (11:59pm - 8:00am) . The event is plotted only on 1 box which is the day of 16, but when is set it at 2018-01-16 23:59:00 and the end date is 2018-01-17 09:00:00 (11:59pm - 9:00am) the result is set 2 box from 16-17 day.I'm having a hard time on setting this time format for this plugin.
I assume you're talking about the "month" type of view, because this is the only situation where this behaviour occurs. It doesn't make any logical sense in the other view types.
Anyway, this behaviour is controlled by the nextDayThreshold setting. When an event's end time spans into another day, this option controls minimum end time it must have in order for it to be rendered onto that day. The default value is 9am
This can be useful if you have an event which ends in the early hours (e.g. a party) but you don't want people to confused into thinking it takes place the next evening, or runs over into the normal working day or something.
In your case, if you wanted your event to appear, you could set the threshold earlier, for example 7am, in order to change the behaviour:
nextDayThreshold: '07:00:00'
Here are two working demos showing you the difference when you change the threshold:
Default behaviour:
http://jsfiddle.net/sbxpv25p/93/
With nextDayThreshold set to 7am:
http://jsfiddle.net/sbxpv25p/94/
See https://fullcalendar.io/docs/event_rendering/nextDayThreshold/ for more detail about this option.
I'm using the fullcalendar plugin and would like to modify the agendaWeek type display days from 07:00-06:59 instead of 00:00-23:59.
With
minTime: '07:00'
I can get the day to start at 07:00 but maxTime won't make the day last longer than 23:59.
Is there any simple solution to this problem?
In Fullcalendar, I want to disable the days which out of the current month.
For example , maybe these days are the last month days or next month days. I want to disable them, who can tell me how to make it to be disabled?
And how to disable the range of time in one day, For example , to disable 6:00AM-8:00AM.
To disable the days which are out of the current month, there's a CSS class on those days "fc-other-month" which you could either use some CSS or JQuery/javascript to disable the events dayClick and eventClick. To work with the time range, the documentation has a minTime: http://arshaw.com/fullcalendar/docs/agenda/minTime/ and maxTime: http://arshaw.com/fullcalendar/docs/agenda/maxTime/ to work with, but these will apply to every day in your calendar, not a specific day. You could always add an event yourself during that timeframe for a specific day and set the attribute: editable to false.
I would like to know if it is possible to show only one week, to use this calendar for showing opening hours of a shop.
So :
- I don't want to show the day dates (only the day names) : OK
- I don't want to colorize the current day : OK
- I want the calendar display always the same week => I don't know how to do that...
Have you got any idea ? Is it possible to do that ?
Thanks a lot !
If you use the "goToDate" method:
gotoDate
Moves the calendar to an arbitrary
year/month/date.
.fullCalendar( 'gotoDate', year [,
month, [ date ]] )
IMPORTANT: month is 0-based, meaning
January=0, February=1, etc.
you could add your shop opening hours on the calendar for a given date, and then just show the date. However, you could also just add them for the current week being shown - this would then allow you to change times, for example, bank holidays etc. Have an array of special dates and print normally if not one of those dates...
Since version 1.3 and 1.4 fullcalendar is now able to show week view:
http://arshaw.com/fullcalendar/docs/views/
http://arshaw.com/fullcalendar/docs/views/Available_Views/
Example:
http://arshaw.com/fullcalendar/views/agendaWeek/