| Issue 799: | event.end should never be null | |
| 11 people starred this issue and may be notified of changes. | Back to list |
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
Jan 19, 2011
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
"This option only affects events that appear in the agenda slots, meaning they have allDay set to true."
Feb 13, 2011
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
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
(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
(No comment was entered for this change.)
Labels:
-Type-BehaviorMod Type-Behavior
Aug 18, 2013
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
Issue 1632 has been merged into this issue.
Aug 18, 2013
Issue 1014 has been merged into this issue.
Aug 23, 2013
Issue 1713 has been merged into this issue.
Aug 25, 2013
Issue 1926 has been merged into this issue.
Sep 1, 2013
(No comment was entered for this change.)
Labels:
milestone-date
Jan 25, 2014
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
(No comment was entered for this change.)
Status:
Implemented
Jun 2, 2014
version 2 has been released with this change. http://blog.arshaw.com/1/post/2014/06/fullcalendar-2-released.html
Status:
Released
|
|
| ► Sign in to add a comment |