<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/base/jquery-ui.css" type="text/css" media="all" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js"
type="text/javascript"></script>
<script type="text/javascript">
$(function () {
var date = new Date();
var currentMonth = date.getMonth();
var currentDate = date.getDate();
var currentYear = date.getFullYear();
$('.datepicker').datepicker({
maxDate: new Date(currentYear, currentMonth, currentDate)
,dateFormat: 'dd/mm/yy'
});
// $(".datepicker").datepicker({ dateFormat: 'dd/mm/yy' });
});
</script>
</head>
<body>
<form name="form1" method="post" action="jquery-datepicker-disable-future-dates.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJMTI2NTkwNzg4ZGRbDTVz2MC5UpGTkkdZvY3KJnAUgpUydaCWojSBJQBj6w==" />
</div>
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAJ5Zn3YxryvLd68XxBjPZLRQmTnPkxgOAq63YiVY5iwpqDSWWmt/puW1Q/JMIy+DE1Z3/cBcb7VSdGxswyHa8dV" />
</div>
<input name="txtDate" type="text" id="txtDate" class="datepicker" />
</form>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/base/jquery-ui.css" type="text/css" media="all" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js"
type="text/javascript"></script>
<script type="text/javascript">
$(function () {
var date = new Date();
var currentMonth = date.getMonth();
var currentDate = date.getDate();
var currentYear = date.getFullYear();
$('.datepicker').datepicker({
maxDate: new Date(currentYear, currentMonth, currentDate)
,dateFormat: 'dd/mm/yy'
});
// $(".datepicker").datepicker({ dateFormat: 'dd/mm/yy' });
});
</script>
</head>
<body>
<form name="form1" method="post" action="jquery-datepicker-disable-future-dates.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJMTI2NTkwNzg4ZGRbDTVz2MC5UpGTkkdZvY3KJnAUgpUydaCWojSBJQBj6w==" />
</div>
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAJ5Zn3YxryvLd68XxBjPZLRQmTnPkxgOAq63YiVY5iwpqDSWWmt/puW1Q/JMIy+DE1Z3/cBcb7VSdGxswyHa8dV" />
</div>
<input name="txtDate" type="text" id="txtDate" class="datepicker" />
</form>
</body>
</html>
No comments:
Post a Comment