Call us now: 1-800-449-5093

accessing the richdatepicker object in javascript in a dnn site

Last post 04-23-2008 3:40 PM by rzumbado. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-15-2008 3:06 PM

    • MaryV
    • Not Ranked
    • Joined on 04-15-2008
    • Posts 1

    accessing the richdatepicker object in javascript in a dnn site

    hello,

    i'm hoping someone can help me - i am using the richdatepicker for a from and to date (range) - i need to verify that the user entered valid date range so i wrote a javascript functio to do this. i placed a customvalidator on the "to" date - but in dnn, i receive "object required" on my entries to the dates - i have the javascript at the very end of my page. any help would be MOST appreciated!

     

    if (document.getElementById("txtActTo").Text < document.getElementById("txtActFromDate").Text)

    {

    e.isvalid =
    false;

    }

    else

    e.isvalid = true;

  • 04-23-2008 3:40 PM In reply to

    • rzumbado
    • Top 25 Contributor
    • Joined on 11-06-2007
    • Costa Rica
    • Posts 53

    Re: accessing the richdatepicker object in javascript in a dnn site

    Hi,

    I can see you are trying to get the txtActo and txtActFromDate elements from javascript, but i think you are doing it in the wrong way. Can you please take a look at "view source" on that page? i think those are not the exactly names for the elements due to namespace issues.

    Also the ".Text" property is not valid. It should be ".value" instead because you are trying to access those from javascript and not from the code behind.

    Finally you cannot compare dates on that way, because, on that function you are comparing strings and not dates, you should first convert those string into dates and then compare.

    Please check your function using these observations and let us now your results.

    Thanks.

Page 1 of 1 (2 items)

Copyright © 1999-2008 Richer Components. All rights reserved worldwide.