Fullcalendar events spanning for more than one day - fullcalendar

I have events on my fullCalendar that span for more than one day. I have the start date and end date and time. However,in my list view of the calendar, the time for the events that span for more than one day is not showing correct. My events start and end time is 8:00 a.m. to 5:00 p.m. but these events show 8:00 a.m. to 12:00 a.,m. for first day and 12:00 a.m. to 5:00 p.m. for next day.
How can I show these timings for the same event 8:00a.m. to 5:00p.m. even though the event spans for more than one day

The behaviour of the calendar is correct. Your event is continuous for all that time. It starts at the start time and ends at the end time, there is no break or gap.
If you have, say, a 3-day event, and want to show it as starting at 8am and finishing at 5pm on day 1, and then the same for day 2 and day 3, then you need to provide the data to fullCalendar as 3 separate events (each with a different date, but the same start/end times).
For example
[
{
"Pressure Equipment Safety Legislation Seminar",
"start": "2019-03-26 08:00",
"end": "2019-03-26 17:00"
},
{
"Pressure Equipment Safety Legislation Seminar",
"start": "2019-03-27 08:00",
"end": "2019-03-27 17:00"
}
{
"Pressure Equipment Safety Legislation Seminar",
"start": "2019-03-28 08:00",
"end": "2019-03-28 17:00"
}
]
Alternatively, depending on which version of fullCalendar you are using, you may be able to take advantage of its recurring event features (new in version 4), or in earlier versions you can implement a custom recurring event solution such as this one.

Related

FullCalendar events which begin on a day where they are hidden shows +More options on empty calendar days in Month View

First time using FullCalendar v4.1.0
I thought I had everything working well, but I have run into a problem. I have set my events to all have overlap = true as desired by the business requirements. The problem now is that I have let's say 5 events which stretch from Monday - Friday. Then on Thursday I have 2 more events which span from Thursday - Sunday. On days Saturday and Sunday it will show the +more link instead of displaying the events which started on Thursday as they are hidden from view under the 5 events which started on Monday because of the eventLimit property. Does anyone know how to make these events which begin on Thursday display in days Saturday and Sunday instead of as the +More link button.
I've been reading through the FullCalendar documentation but am having trouble finding any calendar options that apply to my particular situation.

How to handle winter/summer time when formatting utc dates with Moment.js?

I have built a small calendar app. Events are stored in my database with Dates in UTC. My js code fetches these events and formats the UTC date to the local date of the user machine. Now I live in Sweden so if the UTC time is 10:00, the frontend should show 12:00. This works fine for me except when it comes to summer/winter time. In the frontend the user can set an event to repeat at specific dates. So for example I could set an event that starts at the 20 of every month to start at 12:00. However, lets say I add events from august to December. Events in August-October will show 12:00. Events from November to December will show 11:00. However, if I set a single event to start for example in December, it will show the correct date. What is the best way to deal with this?
This is how I format the utc date to my local date:
var d = moment.parseZone(startDate).local().format('L LT')

Google calendar PHP API time issue

I was playing with Google calendar's API explorer and managed to get the events list from my calendar. And i managed to insert some events into the calendar from API explorer. But im confused with the time property.
When i inserted an event from explorer, i wanted event time to be from 10:00 to 10:30. So i put as following:
{
"end": {
"dateTime": "2018-07-12T10:30:00.0z"
},
"start": {
"dateTime": "2018-07-12T10:00:00.0z"
}
}
Insertion was successful. But when i checked the calendar, its showing that event's time as 03:00-03:30. Date is correct. What I want is, if I insert 10:00 as start time it should be inserted as 10:00 irrespective of time zones and if I insert 10:30 as end time it should show 10:30.
How can I do that?

i want to show datetimetype in symfony as interval

My application is for users to make an appointments with professionnals.
I have a professional and an appointment entities.
The professionnal has:
startAt: start of work in a given day
endAt: end of work at the same day
sessionTime: the duration of a session
For example:
startAt=08:00
endAt=14:00
sessionTime=30mn
In the reservation form i want to show only the available time for making an apppointment.
Following the above example, the available time is:
- 8:00
- 8:30
- 9:00
- ...
- 13:00
- 13:30
and remove from it the time were there is already an appointement.
How i can do that?

Fullcalendar doesn't show correctly event in month mode

I have a problem with the fullcalendar, I have an event that occurs on day 3 and day 4, when a event ends before 9am, the month mode is shown only one day, look:
Week: (ending before 9am)
Month:
Week: (ending after 9am)
Month:
How I fix it? I want to show the event in the Month on both days.
You need to change the nextDayThreshold properties to another hour for the event to display according to your needs.
From the docs:
When an event's end time spans into another day, the minimum time it must be in order for it to render as if it were on that day.
Duration, default: "09:00:00" (9am)
Only affects timed events that appear on whole-days. Whole-day cells
occur in month view, basicDay, basicWeek and the all-day slots in the
agenda views.
Example (docs)
{ start: '2014-02-04T20:00:00', end: '2014-02-05T02:00:00' }
// goes from 8pm to 2am the next day
More info at:
http://fullcalendar.io/docs/event_rendering/nextDayThreshold/

Resources