Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<%@ Register Src="MS_Control/MultipleSelection.ascx" TagName="MultipleSelection" TagPrefix="uc1" %>
<%@ Register Src="MS_Control/MultipleType.ascx" TagName="MultipleType" TagPrefix="uc2" %>

XML
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.19.custom.css" rel="stylesheet" />

   <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>

   <script type="text/javascript" src="js/jquery-ui-1.8.19.custom.min.js"></script>

   <script>
       $(function () {
           $("#datepicker").datepicker();
           $("#Txtdate").datepicker();
       });
   </script>
Posted
Comments
Sinisa Hajnal 11-Feb-15 3:38am    
Not working how? You get an error? Where are your datepicker nad txtdate objects? Note that if you're using server controls such as <asp:TextBox> id will be mangled by control hierarchy.

1 solution

jQuery relies on using selectors.

You selected an element with "id="datepicker"
but there is no such element.

Add the following to your HTML:
HTML
<input type="text" id="datepicker"></input>

Please read also:
http://jqueryui.com/datepicker/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900