Thursday, 1 November 2012

Jquery For Calender

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <link rel="stylesheet" href="http://code.jquery.com/ui/1.8.22/themes/base/jquery-ui.css" type="text/css" media="all" />
            <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" />
            <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
            <script src="http://code.jquery.com/ui/1.8.22/jquery-ui.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function ($) {


        $(function () {
            $.datepicker.setDefaults($.datepicker.regional[""]);
            $(".datepicker").datepicker({ yearRange: "1901:2050"
, changeMonth: true,
                changeYear: true
            });


        });
        // Handler for .ready() called.
    });
  </script>
<style type="text/css">
    .datepicker
    {
        height:20px;
        width:150px;
    }
</style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <center>
    <table>
    <tr>
    <td>DOB:</td>
    <td><asp:TextBox ID="txtdob" runat="server" class="datepicker"></asp:TextBox></td>
    </tr>
    <tr>
    <td>DOJ:</td>
    <td><asp:TextBox ID="txtdoj" runat="server" class="datepicker"></asp:TextBox></td>
    </tr>
    <tr>
    <td colspan="2">
    <center>
    <asp:Button ID="btnsubmit" runat="server" Text="Submit" onclick="btnsubmit_Click" />
    </center>
    </td>
    </tr>
    </table>
    </center>
    </div>
    </form>
</body>
</html>

No comments:

Post a Comment