Hi
I have 2 datetimepickers as shown in the code below. I use jquery.simple-dtpicker.js
I need to modify the datepickers, so when you select an enddate, then the maximum value in the startdate
is set to the value of the enddate. In other words, it should not be possible to select a higher
startdate than the enddate. The challenge is just to set it for one datepicker - not both.
In the file dates.html, I have added the datefields to the change event listener, but the maximumdate is not changes. I have attached my code, so you can try it out.
I have tried it out this way
$('#startTimeField').change(function() {
$('#endTimeField').appendDtpicker({
minDate: $('#endTimeField').val() // when the start time changes, update the minDate on the end field
});
});
But also this way:
$('#startTimeField').change(function() {
$('#endTimeField').appendDtpicker({
minDate: $('#endTimeField').val() // when the start time changes, update the minDate on the end field
});
});
But neither way works.
Regards, Carsten