reformatted how datepicker stores dates