Answer the question
In order to leave comments, you need to log in
How to dynamically change minDate and maxDate bounds in datetimepicker?
Hello.
i have 2 datetimepicker on form with and by
define them in document.create like this
$(document).ready(function()
{
$('#datetime_from').datetimepicker(
{
maxDate: tdatetime,
onSelect: function(selected,evnt) {
updateDateTime_from(selected);
}
}
).datetimepicker("setDate", fdatetime);
$('#datetime_to').datetimepicker(
{
minDate: fdatetime,
onSelect: function(selected,evnt) {
updateDateTime_to(selected);
}
}
).datetimepicker("setDate", tdatetime);
});
function updateDateTime_from(value){
$("#datetime_to").datetimepicker("option", "minDate", value);
};
function updateDateTime_to(value){
$("#datetime_from").datetimepicker("option", "maxDate", value);
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question