locked
Get the value of a sdk:DateTimeControl RRS feed

  • Question

  • Hi Guys,

    We are trying to make an own ASPX page.
    On it we have a sdk:DateTimeControl.
    Now is my question how can we retrieve this value by Javascript.

    It doesn't work by getElementById because the Ids of the input fields are overall the same (DateInput).
    And it also can't be done by getElementById of the sdk:DateTimeControl, because this Id is related to a <table> that it creates.

    Somebody got an idea of how to retrieve the filled in value of sdk:DateTimeControl via JavaScript.

    Thanks in Advance
    Wednesday, August 26, 2009 2:45 PM

Answers

  • Solved

    What I did was just change the id of an input field on runtime.

    document.getElementById("DateInput").setAttribute("id", "input1");
    DateInput = original name
    id = the attribute that is going to be set
    input1 = the value of the attribute you want to set.

    It works for me.
    Thursday, August 27, 2009 12:45 PM

All replies

  • Anybody?
    Thursday, August 27, 2009 11:54 AM
  • Solved

    What I did was just change the id of an input field on runtime.

    document.getElementById("DateInput").setAttribute("id", "input1");
    DateInput = original name
    id = the attribute that is going to be set
    input1 = the value of the attribute you want to set.

    It works for me.
    Thursday, August 27, 2009 12:45 PM