added datepicker to events also. Moved script tags between body