how to set calender in textbox using jquery in ASP.Net c#

As previous we have seen How to set calendar intextbox in asp.net C# but if we want to some stylish calendar or date picker then we can use jquery so here we learn about how to set calender in textbox using jquery .

Source Code



<!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></title>

    <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.min.js" type="text/javascript"></script>

    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js" type="text/javascript"></script>

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" type="text/css" media="all" />

    <script type="text/javascript">

        $(function () {

            $("#<%= txtcalender.ClientID %>").datepicker();
  
        });

</script>


</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="txtcalender" runat="server"></asp:TextBox>
    </div>
    </form>
</body>
</html>


Out-put:-



how to set calender in textbox using jquery in ASP.Net c# how to set calender in textbox using jquery in ASP.Net c# Reviewed by NEERAJ SRIVASTAVA on 11:54:00 AM Rating: 5

No comments:

Powered by Blogger.