Fix reappearance of calendar tooltips on admin book now page

This commit is contained in:
Abhishek Kumar
2023-09-26 16:57:09 +05:30
parent c4d30a80ee
commit de195f56d2

View File

@@ -28,6 +28,8 @@ $(document).ready(function() {
url: rooms_booking_url,
method: 'POST',
extraParams: function() {
removeInitializedTooltips();
return $.extend(
{
ajax: true,
@@ -183,6 +185,14 @@ $(document).ready(function() {
calendar.render();
}
function removeInitializedTooltips() {
$('#fullcalendar a.day-info, #fullcalendar .fc-daygrid-event').each(function () {
if ($(this).data('ui-tooltip')) {
$(this).tooltip('destroy');
}
});
}
function getSearchData()
{
return {