Two digit year passes as a year in 20th century

  • hangingout
    Asked on September 22, 2015 at 5: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!

  • Boris
    Replied on September 22, 2015 at 10:19 AM

    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.

    Two digit year passes as a year in 20th century Image 1 Screenshot 30

    Then simply uncheck past dates to have them no longer allowed, and save:

    Two digit year passes as a year in 20th century Image 2 Screenshot 41

    I hope this helps.

  • hangingout
    Replied on September 22, 2015 at 2:47 PM
    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?
    [cid:image001.png@01D0F538.75621400]
    ...
  • Ben
    Replied on September 22, 2015 at 3:57 PM

    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?

  • hangingout
    Replied on September 22, 2015 at 4:47 PM
    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.
    [cid:image001.png@01D0F549.4024B6B0]
    ...
  • Ben
    Replied on September 22, 2015 at 5:58 PM

    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):

    Two digit year passes as a year in 20th century Image 1 Screenshot 40

    To accomplish this, you should follow the steps mentioned by my colleague above.

    For ease of use, I am posting the same images here:

    Two digit year passes as a year in 20th century Image 2 Screenshot 51

    then make sure that the Past is unchecked, while future is checked.

    Two digit year passes as a year in 20th century Image 3 Screenshot 62

    Once you do that, the data will work just the same as on the clone above.

    Do let us know how it goes :)

  • hangingout
    Replied on September 22, 2015 at 10:47 PM
    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.
    ...
  • Charlie
    Replied on September 23, 2015 at 4:36 AM

    Hi,

    I'm checking the form again http://form.jotform.us/form/52642157669161 and it seems like you have already changed the warning message

    Two digit year passes as a year in 20th century Image 1 Screenshot 50

    You can change it directly in the "Preferences" settings

    Two digit year passes as a year in 20th century Image 2 Screenshot 61

     

    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".

    Two digit year passes as a year in 20th century Image 3 Screenshot 72

     

     

    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:

    Two digit year passes as a year in 20th century Image 4 Screenshot 83

    You can check my cloned test form here: http://form.jotformpro.com/form/52652426111951? 

    I hope that helps.

  • Charlie
    Replied on September 23, 2015 at 4:38 AM

    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 

  • hangingout
    Replied on September 23, 2015 at 8:47 AM
    Thanks for your response. It was quick and helpful!
    ...
  • hangingout
    Replied on September 23, 2015 at 8:47 AM
    Thanks
    ...
  • Ben
    Replied on September 23, 2015 at 10:43 AM

    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 :)