CRM 2011 and 2013 - Default scheduledend time issue RRS feed

  • Question

  • Hi,

    We had a jscript code to default the time to 8:00AM in CRM4. The reason that we did this was because the users were complaining about selecting the time which was on 12:00AM. They were saying that they have to scroll down to find the desired time. in CRM 4, the jscript works on the onchange event of the scheduled end and sets the time to 8. when users click on time textbox to change the time, the list starts from 8:00AM so they dont have to scroll to find 9 or 10 AM. it's right there. Please look at the first Image from CRM 4 and note that 8:00 AM is already on the top of the list and not 12:00AM

    Now we do the same thing in CRM 2011. the jscript sets the time to 8:00 AM but when the user trys to change the time, the list starts from 12 AM. please take a look at the second image:

    this remains in CRM 2013 but this time with an additional issue. The onchange event works only if you focus off from both the Date and the time textboxes. if the user selects a date and press Tab to jump to the time, it doesn't change the time. if the user press the tab one more time to jump to another field, it changes the time this time. however as I told before the first issue is still there.

    this is the javascript code to change the time to 8:00AM

    // the DueDatePreviousValue is set on form load 
    function DueDatetime_onchange() {
        var DueDateCurrentValue = Xrm.Page.getAttribute("scheduledend").getValue();
        if (DueDateCurrentValue != null && DueDatePreviousValue ==null) {
            var DueDate = new Date(DueDateCurrentValue);
            DueDate = DueDate.setHours(8, 0, 0);
            //DueDate = new Date(DueDate.getFullYear(), DueDate.getMonth(), DueDate.getDate, 8, 00);
        DueDatePreviousValue = DueDateCurrentValue;
    Any ideas?

    Thursday, January 9, 2014 12:26 AM

All replies

  • Did you ever get any type of fix for this?  I'd really appreciate the code if you did.


    Monday, March 24, 2014 6:31 PM
  • No, I have not received any. It's crazy
    Monday, March 31, 2014 4:46 PM