Looking for a solution to my issue:
setInterval(function(){
$.ajax({
url: "{{ route('logout_checker')}}",
type: "GET",
success: function(data){
if( data == 0 ){
location.reload();
}
}
});
}, 1000);
The problem I am facing is that the datetime picker () keeps closing automatically.
Whenever I try to open it, it immediately closes, preventing me from making any selections.
I am using this ajax request to check for an active session and reload the page if there isn't one. Is there a better way to handle this so that the datetime picker functions properly?
If I remove the ajax request, the datetime picker works as expected. The issue only arises when the ajax request is included within the setInterval function.