date input and formatting