In my javascript
code I'm using datepicker, like this:
<script type="text/javascript" language="javascript">
function datepicker(element) {
element.datepicker({
showOn: "both",
buttonImage: "calendar",
buttonImageOnly: true
});
}
and later I'm attaching it to the input with id="startDate":
$(document).ready(function(){
datepicker($("#startDate"));
});
it works correctly and fills the startDate input with selected date. But I also have the second input, called endDate - is there a way to handle it within datepicker, so that when user selects startDate, the endDate is populated automatically with a selected date incremented of 2 days?