开发者

Get the value of a BasicDatePicker with JavaScript

开发者 https://www.devze.com 2023-04-02 17:59 出处:网络
I have a Basic Date picker and i would like to ge开发者_JS百科t its value in a JavaScript method.No matter what i try it says undefined is the value.Here is my code that i am using.

I have a Basic Date picker and i would like to ge开发者_JS百科t its value in a JavaScript method. No matter what i try it says undefined is the value. Here is my code that i am using.

                                        <BDP:BasicDatePicker runat="server" ID="bdpToDate" TextBoxStyle-Width="62px" DateFormat="dd-MM-yyyy">
                                        </BDP:BasicDatePicker>

and in the javascript method.....

        var toDate = document.getElementById('<%=bdpToDate.ClientID %>').selectedDate;// does not work

also i have tried using .selectedText and .Value behind the getElementById method and neither worked.


Use value (note v should be lower case)

var toDate = document.getElementById('<%=bdpToDate.ClientID %>_TextBox').value;
0

精彩评论

暂无评论...
验证码 换一张
取 消