Update events.php

Add datepicker and fix PHP errors