Skip to main content
Participant
January 24, 2018
Answered

Date field requires specific format

  • January 24, 2018
  • 3 replies
  • 14146 views

Hello,

I have a form that I am creating, in it there are a couple of date fields. Currently under the format category I have date selected with the date option being m/d/yyyy.

The problem I am having is when I input a date, unless I input the date exactly like m/d/yyyy it won't input. I get the error "Invalid date/time: please ensure that the date/time exists. Field DATE should match format m/d/yyyy". I would like to someone to be able to type mmddyyyy or mmddyy without the "/" between the month, day, and year, and for it to correct to the format of m/d/yyyy.

For example, I want the date to show 5/5/2017. But I want people to have the option to type just 5517 or 050517 or 05052017 and it to format the date to 5/5/2017 when they go to the next text field. Currently it won't allow any of those unless someone puts in the "/". So if they put 5/5/17 it corrects it to 5/5/2017. Or if you put 05/05/2017 it corrects it to 5/5/17.

Is there anyway for this to happen?

Thank you!

Correct answer try67

That's not possible. Imagine they entered "112017". What date is that? Could be "11/20/17", or it could be "1/1/2017". There's no way of determining without using a fixed format, or delimiters.

3 replies

Participant
April 23, 2022

Hi,

I  had the same problem for eg: for 23/05/1998 we need to type 23-May-1998

Hope This Helps.

Bernd Alheit
Community Expert
Community Expert
January 24, 2018

The users can use the calendar dropdown.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
January 24, 2018

That's not possible. Imagine they entered "112017". What date is that? Could be "11/20/17", or it could be "1/1/2017". There's no way of determining without using a fixed format, or delimiters.

Participant
January 24, 2018

Makes sense, thank you!