Bug regarding saving the End By Date

2 posts, 0 answers
  1. Roatin Marth
    Roatin Marth avatar
    65 posts
    Member since:
    Nov 2007

    Posted 21 Jan 2010 Link to this post

    I'm seeing some unexpected and unintuitive behaviour regarding the saving of the End By Date.
    There seems to be some faulty logic that will always increment the user selected date by 1 day (or to the next day) therefore if the user keeps viewing the appointment data and doesn't update anything but clicks save, the End By Date will always increment by 1.

    The bug seems to be in the _getRange function of the advanced form, which is easily enough modified since i am using the custom advanced form approach.

    The code in question is as follows in the getRange js method:

                    if (!this._getElement("AllDayEvent").checked) 
                        range.set_recursUntil($DateTime.add(range.get_recursUntil(), timePerDay)); 

    The problem is that you take the date the user selected and you add an entire day which sets it to midnight, the beginning of the next day all the time so if the user goes to just view the data in edit mode, doesn't change anything but clicks save, as most users will, the end by date shouldn't change but in the current case it will.

    It seems to me you need to subtract a second to always put the end by date at the end of the user selected date (just before the day rolls over).
  2. T. Tsonev
    T. Tsonev avatar
    2794 posts

    Posted 25 Jan 2010 Link to this post

    Hi Roatin,

    Thank you for reporting this problem and for taking the time to track it down to the offending line.

    We do such adjustments for all-day events, so we can accurately represent them (from 00:00 to 00:00), but still allow the dates to be edited in a user-friendly fashion.

    We'll fix the problem and the fix should be available in the next internal build in about a week.

    As a token of our gratitude for your involvement, your Telerik points have been updated.

    Sincerely yours,
    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top