If it is this calendar, (which it looks like from your own "answer"), you could do something like this. It will set "date end" and pop up calendar for it when "date from" is selected:
window.onload = function(){
var cal_start = new JsDatePick({
useMode:2,
target:"date_start",
dateFormat:"%m/%d/%Y"
});
var cal_end = new JsDatePick({
useMode:2,
target:"date_end",
dateFormat:"%m/%d/%Y"
});
cal_start.addOnSelectedDelegate(function(){
document.getElementById('date_end').value = cal_start.getSelectedDayFormatted();
cal_end.showCalendar();
});
};
If you do not want the calendar-end to pop up, remove:
cal_end.showCalendar();
Original answer as per your statement "[…] trough a jquery date picker […]" in question text.
jQuery UI variant:
Use onSelect event.
Simple demo:
$(function() {
$("#date_start").datepicker({
onSelect: function(d) {
$("#date_end").val(d);
}
});
$("#date_end").datepicker();
});
You could also add for change event on element, but not sure how user-friendly that would be.