Auto-formats date input field