Jquery Datepicker Date Range Restriction in Asp.net
18 Jun 2015
Kamal Pratap
Comments
4526
Views
Here we explain how to set jquery datepicker on textbox with date range validator in asp.net. Yor can set it using mindate and maxdate properties.

Asp.Net:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>jQuery UI Datepicker in Asp.Net</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script>
$(function () {
$("#datepicker").datepicker({ minDate: -5, maxDate: +5 });
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
Date:
<asp:TextBox ID="datepicker" runat="server"></asp:TextBox>
</div>
</form>
</body>
</html>