Issue 2189: Event Duration Limit
Status:  Done
Owner: ----
Closed:  Jun 2014
Reported by zumwaltw...@gmail.com, Jun 20, 2014
Problem: When creating an event with a start and end of the same time, the duration of 1 hour is used but I want no duration, this is just an action item, when I remove the end, it still uses the default of 1 hour, when I try to force a duration of 1 minute, the event is given a 1 hour duration + 1 minute on the first event, a 2 hour duration + 1 minute on all other subsequent events.

I have "allDay" set to false, all this system is doing is showing the user the punch time from a recording system, the longest event duration would be 1 minute because we need to show all stamps independently of each other.  Otherwise the event would need a title for the start and a title for the end independent of each other.

On the month view it all looks good but once you move into the week or day view, the result is skewed.


http://jsfiddle.net/3E8nk/50/
====================================
Just in case that gets altered, here is the sample to reproduce the problem, this sample excludes the end, if you just copy the start line and make it an end line with no alterations you will still get a duration of 1 hour.
====================================
$('#calendar').fullCalendar({
    theme: true,
    header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
    },
    events: [{
        id: '2F53B0B96871',
        title: 'Punch IN',
        start: new Date(2014, 5, 16, 9, 10),
        url: 'AView.aspx?uid=3c33f120b889',
        allDay: false
    }, {
        id: '32E608692601',
        title: 'Punch OUT',
        start: new Date(2014, 5, 20, 8, 18),
        url: 'AView.aspx?uid=3c33f120b889',
        allDay: false
    }],
    eventClick: function (event) {
        if (event.url) {
            window.open(event.url);
            return false;
        }
    }
});
Jun 20, 2014
Project Member #1 adamrs...@gmail.com
The JSFiddle doesn't show the important parts of what you're talking about... "when I remove the end" and "when I try to force a duration of 1 minute". In the demo, please make buttons with click handlers that do these actions so that it is possible to debug.
Status: Reproducing
Labels: Type-Bug
Jun 23, 2014
#2 zumwaltw...@gmail.com
Not sure how to make the fiddle program do that at the moment, I will play with it some more.  For some reason I am having problems with the JSFiddle showing Day and Week views but does show month views.

A sample event with the end as follows based on the above items
===============================================================
$('#calendar').fullCalendar({
    theme: true,
    header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
    },
    events: [{
        id: '2F53B0B96871',
        title: 'Punch IN',
        start: new Date(2014, 5, 16, 9, 10),
        end: new Date(2014, 5, 16, 9, 11),
        url: 'AView.aspx?uid=3c33f120b889',
        allDay: false
    }, {
        id: '32E608692601',
        title: 'Punch OUT',
        start: new Date(2014, 5, 20, 8, 18),
        end: new Date(2014, 5, 20, 8, 19),
        url: 'AView.aspx?uid=3c33f120b889',
        allDay: false
    }],
    eventClick: function (event) {
        if (event.url) {
            window.open(event.url);
            return false;
        }
    }
});

====================================================
click events only open URL location so not sure how that equates to JSFiddle
Jun 23, 2014
#3 zumwaltw...@gmail.com
See attached image, this is with the end date set to say date/time + 1 minute on all items that actually have a time associated with them. I attempted to set the default to 1 minute using the default option given HH:MM:SS so 00:01:00
=================================================
<script type="text/jscript">
$(document).ready(function () {
$('#calendar').fullCalendar({
theme: false,
header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' },
default: '00:01:00',
events: [
==========================================
The events then follow sample:
==========================================
          {
              id: '6A473F1E-5431-4A4C-AF56-860194457E11',
              title: 'Punch IN',
              color: 'green',
              start: new Date(2014,5,2,7,39),
              className: '.eventItem',
              allDay: false
          },
          {
              id: 'D027AEDB-3C0F-48D8-898B-E7128375D610',
              title: 'Punch OUT',
              color: 'red',
              start: new Date(2014,5,2,12,44),
              className: '.eventItem',
              allDay: false
          },
          {
              id: 'AF5AE859-14FD-43A1-B805-779372C97B12',
              title: 'Punch IN',
              color: 'green',
              start: new Date(2014,5,2,13,40),
              className: '.eventItem',
              allDay: false
          },
          {
              id: '8EDDC35D-4F3C-499B-B7AC-F6BC2AF20C23',
              title: 'Punch OUT',
              color: 'red',
              start: new Date(2014,5,2,16,40),
              className: '.eventItem',
              allDay: false
          },
          {
              id: 'SPAN635373777600000000',
              title: 'Time Worked: 8:05',
              color: 'blue',
              start: new Date(2014,5,2,16,40),
              className: '.eventItem'
          },
================================================================

Another sample:
http://jsfiddle.net/3E8nk/70/

Unfortunately I still can't get JSFiddle to do the Week and Day vs the Month...
I will work on this more to figure out why.
Capture.JPG
107 KB   View   Download
Jun 23, 2014
Project Member #4 adamrs...@gmail.com
fixed your fiddle. you spelled "agendaDay" incorrectly:
http://jsfiddle.net/3E8nk/72/

I don't see any buggy behavior. Events are allowed to have no end time. They will appear to be 2 hours, but internally they won't have an end time. This default displayed duration is controlled by this setting:
http://arshaw.com/fullcalendar/docs/event_data/defaultTimedEventDuration/

please play with that setting to get what you want.
Status: Done