Hi all,
I am trying to acces value of WebDateChooser from client side, but not getting value
var dateChooser = igdrp_getComboById('<%= EndDate.ClientID %>');
var selectedDate = dateChooser.getValue();
my webDateChooser is inside the webspiltter control.
Thanks
Shital
HI,
Make sure your control's name is EndDate. Your WebDateChooser can have null values and therefore return null.
I tested your code and it should work.
Here is my page I used to test this out with.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="Infragistics2.WebUI.WebDateChooser.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.WebSchedule" tagprefix="igsch" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title><script language="javascript" type="text/javascript">// <!CDATA[
function Button1_onclick() { var dc = igdrp_getComboById('<%= WebDateChooser1.ClientID %>'); var selectedDate = dc.getValue(); alert(selectedDate);}
// ]]></script></head><body> <form id="form1" runat="server"> <div> <igsch:WebDateChooser ID="WebDateChooser1" runat="server" ShowDropDown="True"> </igsch:WebDateChooser> </div> </form> <p> <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" /></p></body></html>