Issue 799: event.end should never be null
Status:  Released
Owner: ----
Closed:  Jun 2014
Reported by jules.bo...@gmail.com, Jan 18, 2011
Event "end" property is null in "renderAfterEvent" callback if we haven't set it before (it should be automatically calculated).


$el.fullCalendar('renderEvent', {title: 'new event', start: date});

eventAfterRender = function(event, element, view) 
{
    console.log(event.end); // null
}

Why ?
Jan 19, 2011
Project Member #1 althaus.it
>it should be automatically calculated
Too what value?

Jan 19, 2011
#2 jules.bo...@gmail.com
it should be :
event.start + defaultEventMinutes option.

So with a zero configuration the end should be 120 minutes after the start (default value of defaultEventMinutes option).

http://arshaw.com/fullcalendar/docs/agenda/defaultEventMinutes/

No ?
Jan 25, 2011
Project Member #3 althaus.it
"This option only affects events that appear in the agenda slots, meaning they have allDay set to true."
Feb 13, 2011
Project Member #4 adamrs...@gmail.com
yeah, defaultEventMinutes merely affects the display of events, doesn't try to modify the event objects themselves if they are missing an end date.

but i'm not sure if the current behavior is the best behavior. will think about it.
Summary: Automatically set event.end
Status: Maybe
Feb 10, 2012
#6 a.gunas...@gmail.com
Maybe not the best option, but to set end-date automatically to add defaultEventMinutes if no end-date is present:

Find the function normalizeEvent(event) in fullcalendar.js

then after:

event._start = cloneDate(event.start = parseDate(event.start, ignoreTimezone));

add:

if (!event.end) {
	event.end = cloneDate(event.end = event._start.setMinutes(event._start.getMinutes() + options.defaultEventMinutes));
}
Aug 13, 2013
Project Member #7 adamrs...@gmail.com
(No comment was entered for this change.)
Summary: Automatically set event.end based on defaultEventMinutes (was: Automatically set event.end)
Status: Discussing
Labels: Type-BehaviorMod
Aug 14, 2013
Project Member #8 adamrs...@gmail.com
(No comment was entered for this change.)
Labels: -Type-BehaviorMod Type-Behavior
Aug 18, 2013
Project Member #9 adamrs...@gmail.com
renaming this be a broader issue.

because other issues bring up the point: if the feed specifies the start and end to be the same exact time, current behavior is to set the end to null. should we do this?
Summary: event.end should never be null (was: Automatically set event.end based on defaultEventMinutes)
Aug 18, 2013
Project Member #10 adamrs...@gmail.com
 Issue 1632  has been merged into this issue.
Aug 18, 2013
Project Member #11 adamrs...@gmail.com
 Issue 1014  has been merged into this issue.
Aug 23, 2013
Project Member #12 adamrs...@gmail.com
 Issue 1713  has been merged into this issue.
Aug 25, 2013
Project Member #13 adamrs...@gmail.com
 Issue 1926  has been merged into this issue.
Sep 1, 2013
Project Member #14 adamrs...@gmail.com
(No comment was entered for this change.)
Labels: milestone-date
Jan 25, 2014
Project Member #15 adamrs...@gmail.com
v2.0.0-beta was just released, and introduces a new options.

achieve what you want by setting the following option to `true`:
http://arshaw.com/fullcalendar/docs2/event_data/forceEventDuration/

please check it out and let me know what you think!
Status: Accepted
May 25, 2014
Project Member #16 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Implemented
Jun 2, 2014
Project Member #17 adamrs...@gmail.com
version 2 has been released with this change.
http://blog.arshaw.com/1/post/2014/06/fullcalendar-2-released.html
Status: Released