Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
198
Set value using javascript?
posted

I'm trying to set the value of a WebDateChooser using javascript.  However, the value never gets set, it just defaults to null.  Is it possible to set a WevDateChooser value using javascript? if yes, how do i do this?

  

Parents
  • 28407
    posted

    HI

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

    <%@ Register Assembly="Infragistics2.WebUI.WebDateChooser.v7.3, Version=7.3.20073.38, 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[
    var dchooser = null;
    function Button1_onclick() {
    //debugger;
    var dt = new Date();
     dchooser.setValue(dt);
    }

    // ]]>


    function WebDateChooser1_InitializeDateChooser(oDateChooser){
     //Add code to handle your event here.
     dchooser = oDateChooser;
    }
    // -->
    </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <igsch:WebDateChooser ID="WebDateChooser1" runat="server" OnInit="WebDateChooser1_Init">
                <ClientSideEvents InitializeDateChooser="WebDateChooser1_InitializeDateChooser" />
            </igsch:WebDateChooser>
       
        </div>
            <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
        </form>
    </body>
    </html>

Reply Children