Validation is based on height and distance from top calculation. Problem is when i try to build hidden calendar. Dispaly: none is giving 0px of height to calnedar, so validation is not working.
To resolve it, i add one "if condition", to disable validation, when calendar is hidden.
im creating page based on tabs, where on tab is displayd and other are hidden. Switching is based on giving display none/block to tabs content.
Here is hotfixed isValid function. Look at if ($(current).is(':visible')) { line
isValid: function (current) {
var currentStart = Math.round(current.position().top);
var currentEnd = Math.round(current.position().top + current.height());
var start = 0;
var end = 0;
var check = true;
if ($(current).is(':visible')) {
$('.jqs-period', $(current).parent()).each(function (index, period) {
if (current.attr('id') !== $(period).attr('id')) {
start = Math.round($(period).position().top);
end = Math.round($(period).position().top + $(period).height());
if (start > currentStart && start < currentEnd) {
check = false;
}
if (end > currentStart && end < currentEnd) {
check = false;
}
if (start < currentStart && end > currentEnd) {
check = false;
}
if (start === currentStart || end === currentEnd) {
check = false;
}
}
});
}
return check;
},
Validation is based on height and distance from top calculation. Problem is when i try to build hidden calendar. Dispaly: none is giving 0px of height to calnedar, so validation is not working.
To resolve it, i add one "if condition", to disable validation, when calendar is hidden.
im creating page based on tabs, where on tab is displayd and other are hidden. Switching is based on giving display none/block to tabs content.
Here is hotfixed isValid function. Look at
if ($(current).is(':visible')) {
line