Fixed java script and made a loading message for calendar