Datepicker in .net using JQuery
In this article I'm trying to explain how to work with Date Picker using Jquery. Here, we just call one method to achieve our goal. All of us know that Jquery is low design and browser compatability. So, using this we can achieve our goal with simple steps.
Jquery DatePicker:
In this article I'm trying to explain how to work with Date Picker using Jquery. Here, we just call one method to achieve our goal. All of us know that Jquery is low design and browser compatability. So, using this we can achieve our goal with simple steps.Source Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DatePicker.aspx.cs" Inherits="DatePicker" %>
<!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>
<meta charset="utf-8">
<title>jQuery Datepicker</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
$(function () {
$("#txtDate").datepicker();
});
</script>
</head>
<body>
<form runat="server">
Date: <asp:TextBox ID="txtDate" runat="server"></asp:TextBox>
</form>
</body>
</html>
In the above code we call one funciton named as .datepicker(), using that we can achieve our goal. Using that we can call datepicker then we can able to use date function to our controls.Conclusion:
If we want to perform date selection, this article will help you a lot. If you want more information out of this then refer jquery ui site.References:
To achieve this goal, my self refer below link. Refer below link to know more about Jquery operations.
https://jqueryui.com/