I have a radio button that when clicked, performs a function that mounts a datepicker.
However, the mountDatepicker function only loads after a few seconds, after querying the three apis to mount the calendar.
So how do I load an image with a loader in place of the calendar while the function does not finish?
$("input[type='radio']").click(function(){
if ($("input[name='diasaluguel']:checked").length > 0 ) {
mountDatepicker();
}
});