Built the basic functions of the calendar in javascript