C# .NET - Ajax calander not getting displayed - Asked By abinav shankar on 15-Jan-12 01:12 PM

Hi
 
I  am using ajax calander extender but it is not getting displayed I have add the script manager but still the calander is not getting displayed This is my source Pl check where I went wrong
<asp:TextBox ID="txtFromDate" runat="server"></asp:TextBox>
        <cc1:CalendarExtender ID="txtFromDate_CalendarExtender" runat="server"
          TargetControlID="txtFromDate">
        </cc1:CalendarExtender>
thanks
dipa ahuja replied to abinav shankar on 15-Jan-12 02:33 PM

try jquery datetime 

use jquery 

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>  

<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js"></script>  

<link href="fbox/jquery-ui-1.8.11.custom.css" rel="stylesheet" type="text/css" />

<script src="fbox/jquery.ui.datetimepicker.min.js" type="text/javascript"></script>

  

<script type="text/javascript">

  $(function () {

  $('#TextBox1').datetimepicker();

  });

</script>

<input type="text" id="TextBox1" />

       

OUTPUT:

       

Riley K replied to abinav shankar on 15-Jan-12 08:55 PM


Did you place it inside UpdatePanel ??


<asp:UpdatePanel runat="server" ID="dateUpdatePanel" RenderMode="Inline">
<ContentTemplate>   
  <asp:TextBox runat="server" ID="txtDateFrom" />
     <ajax:CalendarExtender runat="server" ID="calendarFrom" TargetControlID="txtDateFrom"
    PopupButtonID="cmdDateFrom" Format="dd/MM/yyyy" />      
 
</ContentTemplate>
</asp:UpdatePanel>

Regards
smr replied to abinav shankar on 15-Jan-12 11:01 PM
hi

For using the ASP.NET AJAX Control Toolkit toolkit, you need to download the ASP.NET AJAX Control Toolkit from http://www.asp.net/ajax/downloads/


try iin this way

<form id="form1" runat="server">
  <ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server" />
  <div>
  <asp:TextBox ID="Date1" runat="server"></asp:TextBox>
  <ajaxToolkit:CalendarExtender
    ID="CalendarExtender1" runat="server" TargetControlID="Date1">
  </ajaxToolkit:CalendarExtender>
  </div>


follow
 http://www.dotnetcurry.com/ShowArticle.aspx?ID=149