Uploaded image for project: 'PUBLIC - Liferay Alloy UI'
  1. PUBLIC - Liferay Alloy UI
  2. AUI-3157

Alloy-ui scheduler day and week views dragging event gives wrong startDate,endDate

    Details

    • Type: Technical Support
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Scheduler
    • Labels:
      None

      Description

      On dragging scheduler event in week view mode gives wrong start date and end date.

      function afterEventMoved(event, scheduler) {
                  var startDate;
                  var endDate;
                  var Content;
                  var Id;
                  // Obtain the new start and end dates in the month view.
                  if (event.currentTarget.originalDragNode) {
                      var eventNodeId = event.currentTarget.originalDragNode.get('id');
                      var eventsArray = scheduler.getEvents();
                      var movedEvent = null;
                      for (var i = 0; i < eventsArray.length; i++) {

                          if (eventNodeId === eventsArray[i].get('node').get('id')[0]) {
                              movedEvent = eventsArray[i];
                              break;
                          }
                      }

                      startDate = movedEvent.get('startDate').format('yyyy-MM-dd HH:mm:ss');
                      endDate = movedEvent.get('endDate').format('yyyy-MM-dd HH:mm:ss');
                      Id = movedEvent.get('id');
                      Content = movedEvent.get('content');

                  }

                  // Obtain the new start and end dates in the day and week views.
                  // Unfortunately, there seems to be a bug and the time of these dates
                  // seems to be incorrect (it seems to be the time before the event was dragged).
                  // The day, month, and year seem to be correct though.
                  else {   
                      startDate = event.currentTarget.draggingEventStartDate.format('yyyy-MM-dd HH:mm:ss');
                      endDate = event.currentTarget.draggingEventEndDate.format('yyyy-MM-dd HH:mm:ss');
                  }                  
              }

      below line gives wrong date


      event.currentTarget.draggingEventStartDate

      event.currentTarget.draggingEventEndDate

        Attachments

        1. Pic-2.jpg
          Pic-2.jpg
          104 kB
        2. Untitled.jpg
          Untitled.jpg
          149 kB

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                1 year, 25 weeks ago

                Packages

                Version Package