jQuery UI Datepicker Disable Past Dates Days
Nov 18, 2012
Description:
In previous posts I explained Disable weekends in jQuery 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 past dates in jQuery datepicker.
In previous posts I explained Disable weekends in jQuery 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 past dates in jQuery datepicker.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>jQuery Datepicker: Disable past days</title>
<link rel="stylesheet"
href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css"
/>
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<script type="text/javascript">
$(function()
{
var date = new Date();
var currentMonth = date.getMonth();
var currentDate = date.getDate();
var currentYear = date.getFullYear();
$('#datepicker').datepicker({
minDate: new
Date(currentYear, currentMonth, currentDate)
});
});
</script>
</head>
<body>
<p>Date: <input type="text" id="datepicker" /></p>
</body>
</html>
|
Demo
admit card 2015,
ReplyDeleteExams Result
Answer Key
Question Papers
Syllabus
admit card
Naukri
government jobs
goodmorning sms
ReplyDeletegoodnight sms
whatsapp status
happy birthday wishes
naughty birthday wishes sms
marriage wishes sms
love quotes
Advice Messages
Sad SMS
Friendship Sms
Santa Banta Jokes
This comment has been removed by a blog administrator.
ReplyDelete
ReplyDeletecharoli
semolina benefits
lassi benefits
amla candy benefits
tulsi benefits
rice flakes