Fixed date issue when submitting dates.