making sure date field saves right value