Hello,
My datepicker code is the following:
jQuery( “#start-date” ).datepicker({
dateFormat: ‘dd-mm-yy’,
defaultDate: new Date(),
beforeShowDay: function(date){
var startDate = jQuery.datepicker.formatDate(‘yy-mm-dd’, new Date());
var currentDate = jQuery.datepicker.formatDate(‘yy-mm-dd’, date);
return [ currentDate >= startDate]
}
});
This works with IOS but not with android.
If i add the following code to fix positioning:
beforeShow: function (input, inst) {
var rect = input.getBoundingClientRect();
setTimeout(function () {
inst.dpDiv.css({ top: rect.top -40, left: rect.left + 0 });
}, 0);
}
Then it works with Android but not with IOS.
This code exists in a wordpress site and the problem happened when i upgraded from 5.5 to 5.7
Any ideas how to fix this problem?