Fixed date issue when submitting form.