Hallo @Rolf b
so funktioniert es:
var dateFormat = "dd.mm.yy",
from = $( "#start" )
.datepicker({
minDate: 2
})
.on( "change", function() {
to.datepicker( "option", "minDate", getDate( this ) );
$("#ende").prop("disabled", false);
}),
to = $( "#ende" ).datepicker({
minDate: 2
})
.on( "change", function() {
from.datepicker( "option", "maxDate", getDate( this ) );
});
function getDate( element ) {
var date;
try {
date = $.datepicker.parseDate( dateFormat, element.value );
} catch( error ) {
date = null;
}
return date;
}
$("#ende").datepicker({dateFormat: 'dd.mm.yy'}).prop("disabled", true);