onClose: function(selectedDate) {
$("#dpTodate").datepicker("option", "minDate", selectedDate);
var maxDate = new Date(selectedDate);
maxDate.setDate(maxDate.getDate() + 6); //6 days extra in from date
$("#dpTodate").datepicker("option", "maxDate", maxDate);
}