Fullcalendar - event shows wrong end date by one day - fullcalendar

I have training events from database and their start and end dates are in this format "YYYY-MM-DD". For example is:
{
'title':'English Training',
'start':'2015-05-19',
'end':'2015-05-23'
}
But when it is rendered in calendar, it shows wrong end date
I tried adding 12hours on endDate (*just like the answer * here) , and yes it works but now I'm unable to extend the day for an event.
I want to fix this wrong end date issue without losing the capability to extend events. Do you know any solution or hacks?

Adding 12 hours on the endDate of your event won't make it an allDay event anymore, which is why you will loose the ability to extend your event in month view.
However, adding 1 day on the endDate will work perfectly as :
Your event will remain an allDay event (so it will remain extendable)
Your endDate will become 2015-05-24 (understood by FullCalendar as 2015-05-24T00:00:00) which means that your event will end at the very first minute of 2015-05-24 which is what you want.
To conclude : if you want an allDay event to end at midnight of day1, you have to set its endDate as day2 !

Related

how to show the dtstart and until using rrule plugin from daterange in fullcalendar 5

I am using fullcalendar 5 and when using eventClick i want to show the dtstart and until values from a recurrent event. I am using the rrule plugin.
When i click on asingle event, this gives me the data from start:
eventClick: function(info) {
alert(info.event.startStr); // something like 2021-05-04
but in case it is a recurrent event which has a date range from lets say 2021-05-01 till 2021-07-01
and the first occurrence appears on 2021-05-05, the alert show me this date (2021-05-05) and i want to show me the date of the start of the recurrence, so 2021-05-01. Really don't know how to get the startdate and enddate of the range from an recurrent event when i use the evenClick function in combination with rrule plugin...
Can someone help me with that?

fullcalendar wrong timespamp for midnight

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???

Fullcalendar - Display an event with no end date

How do I go about displaying a long-running event with no end date? The data provided to me only shows when the event started but no end date because it's set to "Forever". It appears that when I only provide the start option, it only sets the event to show up on that day and not the following days.
I have a possible workaround for this, where if there is no end date from the event source, I always set the end date to 24 months from today, but that means if someone navigate the calendar past 24 months, the event would appear to have ended then. Would be nice to have something that will just keep going forever.

Symfony 2 - Generate calendar month table with links to events in it

I have an Entity called Event, with fields startDate, startTime, endDate and endTime. startDate and endDate are dates of which endDate can be NULL if it is the same of startTime (I can change this behaviour if it makes things easier as I have no events yet). startTime and endTime can not be NULL. It also has an isOnDate(\DateTime $date) method, which returns true if the event will run on the given date.
It was like pain, but I finally generated an HTML table of any given calendar month, passing the day of week of the month's first day (firstDow) and the number of days in that month (numDays) as template variables.
The next step would be to make some table cells links to event or event listing pages if the given days has one or more events. Now I'm a bit stuck, as I don't know how to get the DateTime() object of each cell in a template.
Can someone give me a hint on this? Or am I making it totally wrong?
You can display DateTime Objects as Text Dates using Twig Filter date:
{{ event.startDate|date("m/d/Y") }}
You could use Ajax and jQuery to link dynamically your page with your database. You could start from this calendar code for Symfony2: http://www.symfocal.com

How to display the calendar according to event data startdate

I have a event data which contains startdate and end date , i want to see the calendar holding that event,now what is happening is it is showing the current week calendar ,but if my event having previous week satrtdate means i have to go to previous week and and i can able to see the event data in calendar..but i want to focus that date calendar at first shot itself..pls do the needful its urgent, i think i have to change something in fullcalendar.js but i dont know where to change pls do needful
Check the documentation for FullCalendar... http://arshaw.com/fullcalendar/docs/current_date/
This shows parameters that can be set to get the calendar to initate at a particular date.. by default it will always start at todays date.

Resources