some changes to controller and jquery ui datepicker addition