aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

jQuery Datepicker- Disable Future Dates in Calendar

Nov 18, 2012
Here I will explain how to disable future dates in
jQuery datepicker.
In previous posts I explained Disable past dates,
Disable weekends in datepicker, Show multiple months in datepicker, Show datepicker on button click and many articles relating to JQuery and datepicker. Now I will explain how to disable future dates in jQuery datepicker.

To disable future dates in datepicker we need to write the code like this

<html xmlns="">
<meta charset="utf-8" />
<title>jQuery Datepicker: Disable Future Dates</title>
<link rel="stylesheet" href="" />
<script src=""></script>
<script src=""></script>
<script type="text/javascript">
$(function() {
var date = new Date();
var currentMonth = date.getMonth();
var currentDate = date.getDate();
var currentYear = date.getFullYear();
maxDate: new Date(currentYear, currentMonth, currentDate)
<p>Date: <input type="text" id="datepicker" /></p>

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Mukesh Kumar said...

Hi... you deleted my comment...

Unknown said...

thanks sir

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.