issue fixed with datepicker dates not being stored correctly