switched the end date from jquery to php