kimmi_baby 0 Light Poster

Hi,
I have 2 calendars using jquery UI datepicker. The first calendar is default to todays date. What I need to happen is for the second calendar default date to change to default date (of first calendar) + 1 day. I'm really not too sure how to do this... So any help would be great!

This is the code I have so far:

$(document).ready(function(){
 $("#startDate").datepicker({     
dateFormat: "dd/mm/yy" }).val()			
$('#startDate').datepicker('setDate', new Date());
						
}); 

$(document).ready(function(){
 $("#endDate").datepicker({     
dateFormat: "dd/mm/yy" }).val()			
						
}); 

$('#startDate').datepicker({onSelect: function(dateStr) {
           $('#endDate').datepicker('option', 'defaultDate', dateStr);
     }});
$('#endDate').datepicker();
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.