getting the date picker to work properly