locked
Set Default Date Fields RRS feed

  • Question

  • I have the following 2 Date/Time fields:

    new_dateconfirmed (Start Date)
    new_enddate (End Date)

    I want the user to pick a Start Date/Time and have the End Date/Time default to the Start Date/Time?

    Cannot find anything out there doing this?

    Any help appreciated




    Friday, October 30, 2009 8:43 PM

Answers


  • Step 1 : Make End Date read only (if you do not user to edit this on screen other wise ignore this step)

     put following code on Form Load..

       crmForm.all.new_enddate.Disabled = true;
          

    Step 2 : You should put the following code on Start Date (new_dateconfirmed) on Change Event (and enable this event)

    crmForm.all.new_enddate.DataValue = crmForm.all.new_dateconfirmed.DataValue;


    hope this helps..

    Friday, October 30, 2009 9:13 PM
    Answerer
  • This is great, works great!
    • Marked as answer by sixty4 Tuesday, November 3, 2009 8:25 PM
    Tuesday, November 3, 2009 8:08 PM

All replies


  • Step 1 : Make End Date read only (if you do not user to edit this on screen other wise ignore this step)

     put following code on Form Load..

       crmForm.all.new_enddate.Disabled = true;
          

    Step 2 : You should put the following code on Start Date (new_dateconfirmed) on Change Event (and enable this event)

    crmForm.all.new_enddate.DataValue = crmForm.all.new_dateconfirmed.DataValue;


    hope this helps..

    Friday, October 30, 2009 9:13 PM
    Answerer
  • This is great, works great!
    • Marked as answer by sixty4 Tuesday, November 3, 2009 8:25 PM
    Tuesday, November 3, 2009 8:08 PM