front end date lookup AJAX working