I'm trying to enforce choosing only dates between (today minus a week, today plus a week) but instead getting a datePicker with past dates disabled and unrestricted future dates.
Any idea? (I'm new to jQuery, 2nd day of playing with it...) thanks!
I isolated the code to clearly repro it:
<html>
<head>
<title>jquery sample</title>
<script type="text/javascript" src="jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="date.js"></script>
<script type="text/javascript" src="jquery.datePicker.js"></script>
<link href="datePicker.css" rel="stylesheet" type="text/css" />
<link href="custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8">
$(function () {
$('.date-pick').datePicker({ minDate: '-7D', maxDate: '+7D' }).val(new Date().asString()).trigger('change');
});
</script>
</head>
<body>
<a href="">Link</a>
<input name="date1" id="date1" class="date-pick" />
</body>