What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Two digit year passes as a year in 20th centuryAsked by hangingout on September 22, 2015 at 05:45 AM
I have a form with that asks the user to enter a date, and then that date is copied to a second date field which the user can then leave or modifiy (first available date, second available date). However, if the user enter 12/01/15, the system copies that over as 12/01/1915, so the user always has to edit that second field because no past dates are allowed.
Is this a bug or am I doing something wrong?
Thanks in advance for your help!
When two digits are entered in a date field as a year (such as 15), it is calculated as if it were in the 20th century (1915). If you need to enter a year in the 2000s, please use the full four-digit syntax for years.
A date such as 12/01/15 is not equivalent to 12/01/2015, and the latter should be entered on the form.
To have your users enter a correct full date with four digits, you can disable past dates on the first date field, so that your users would be presented with a message that past dates are not allowed.
You can do so by clicking on the gear-shaped icon of your date field, Show Properties, and than on the Limit Dates button in the popup that opens.
Then simply uncheck past dates to have them no longer allowed, and save:
I hope this helps.
Thank you for the detailed help. The problem is that the error message is confusing for a user, with “this date is unavailable”
They may think that they can’t be put on the waiting list for that date.
It is really a problem with the copy feature as the Jot Form does store the data for 12/1/15 as 12/1/2015.
How can I programmatically modify just the year portion of the date in latest move
So I am thinking, I leave the general property of Disable Past Dates to yes, then after someone fills out earliest the system copies the earliest date to latest, then I view latest and if it is less than 1/1/2001 I add 100 to the year field.
Does that make sense?
Or can I change the error message?
I am looking at your form http://form.jotform.us/form/52642157669161 and when set the date in Earliest Move In Date DateTime field, it is immediately passed with the same value to the Latest Move In Date.
Can you please confirm that this is what you were after and if you are experiencing the same thing on your side?
Yes it now seems to be working that way. I think it is because I changed the condition wizard to copy the date as text instead of a number, so it doesn’t add the 19.
The issue is I have now is the parameter “disable past dates” is set to yes, but I can put in 12 1 01 and there is no error.
If I put in 12 1 1 or 12 1 01 I don’t get an error message, 12 1 2001 does give error message of no dates in the past.
But wondering how to be sure it works for any values entered into the year values.
The reason for this is that there are 2 different setups for past dates, so both need to be selected for what you would like to accomplish, although I usually suggest turning them both on.
You can see a clone of your form and how it works with the same entries you have mentioned now: http://form.jotformpro.com/form/52646777709976
This is the screenshot of how it looks (the setup is applied to the first DateTime field only, but you can apply it to both):
To accomplish this, you should follow the steps mentioned by my colleague above.
For ease of use, I am posting the same images here:
then make sure that the Past is unchecked, while future is checked.
Once you do that, the data will work just the same as on the clone above.
Do let us know how it goes :)
Thanks ben, but like I mentioned in a previous email, the error message of “the date is unavailable” is very confusing. While I understand it as the program is saying the date is not available in the calendar because the calendar can only do future dates, that error to a user of the form may indicate to the user that there is no way to be put on the waiting list for that date and they have to select a new date.
Is there any way edit the error message, which I doubt?
Or is there anyway to be sure the system properly validates the 2 digit year.
Or is there a way for me to validate the year on my own.
So after the 2 digit year is input can I check the length of the year value and if only 2 digits than add 2000 to it?
Thanks in advance for your help.
I'm checking the form again http://form.jotform.us/form/52642157669161 and it seems like you have already changed the warning message
You can change it directly in the "Preferences" settings
For the two digit year, you can disable the input of it by disabling option in the "Limit Dates" option as mentioned by my colleague, this is how it looks like:
When I entered 2 digit year, it will show "This date is unavailable".
If you want to change the "This date is unavailable", that is possible by changing it in the "Edit Form Warnings" settings in the "Preferences". You can make a general message to avoid confusion. Here's mine:
You can check my cloned test form here: http://form.jotformpro.com/form/52652426111951?
I hope that helps.
Here's a guide that you can refer on how to change the warning messages: http://www.jotform.com/help/61-How-to-Change-Form-Warnings
Thanks for your response. It was quick and helpful!
In my colleague's name, you are welcome.
Do let us know if you happen to have any further questions and we would be happy to assist with the same :)