How to Set the Date Picker Field to the Current Date on when the Form is Opened

  • Maurice
    Gefragt am 26. August 2024 um 08:47

    Hi,

    I noticed a bug when using manual prefills where dates that have the option "default date" set as the current day. In a prefill, the date keeps being set on the creation date of the prefill, and does not adapt dynamically to the actual (current) date where the prefill is being used.

    Best regards, Maurice

  • Anna Jotform Support
    Geantwortet am 26. August 2024 um 10:55

    Hi Maurice,

    Thanks for reaching out to Jotform Support. Can you send me the link to the form that is having the issue so I can take a look at it for you? Let me show you how:

    1. In Form Builder, in the orange navigation bar at the top of the screen, click on Publish.
    2. Click on Quick Share on the left side of the screen.
    3. Click the Copy Link button then share the copied URL with us.

    How to set up my forms email conditional logic? Image 1 Screenshot 20 Screenshot 20

    Also, if you are trying to set the Date Picker field to the current date when the form is being filled out, you don't need to add it to the Manual Prefill as the Date field will automatically adjust the date to the current date on when the form is opened if you have set the Default Date to Current. Let me show you how:

    1. In Form Builder, click the Gear icon of the Date Picker field.
    2. Go to the Options tab.
    3. Under the Default Date section, select Current.

    How to Set the Date Picker Field to the Current Date on when the Form is Opened Image 1 Screenshot 31

    Once we hear back from you, we'll be able to help you with this.

  • Maurice
    Geantwortet am 9. September 2024 um 12:07

    Hi, I no longer am using the prefill since I started using it to ensure the functionality of the form.


    I have created a minimal working example for you, though: https://reservix.jotform.com/242415231120842/

    The date field on the first page has the following attributes: readonly, default date = current and limit = future dates only.

    When viewed via the usual form link, the date correctly fills in to todays date using the " Default Date section, select Current" as you described it.
    When using the prefill link (https://reservix.jotform.com/242415231120842/prefill/66d09f4439646379fa4d5f8cef72) that I created a few days ago, "today's date" does not get updated to the current date, it retains the date when the prefill was created.
    At no point did I specify the date in the prefill - that would not be possible anyway since the field is set to be readonly.
    How to Set the Date Picker Field to the Current Date on when the Form is Opened Image 1 Screenshot 20

    Now I cant edit page 2 or greater in the prefill, since the readonly - future only limitation of the date field prevents me from editing it. I understand that this is a very niche case and can be solved easily by allowing the date to be edited or not validating it; that would defeat the purpose of the filters though.

    Hope that made it clearer. If you do not have a solution for this, which I assume because I believe the reason to be a bug, then I am fine too. I did not expect support, I just wanted to let you know that this limitation exists (where I think it should not - prefills should respect default values and not "freeze" them).
    Best, Maurice

  • Anna Jotform Support
    Geantwortet am 9. September 2024 um 12:12

    Hi Maurice,

    I checked the form that you are using and can see that you are an Enterprise plan user. For any Enterprise-related issue or inquiry regarding your account or forms, you will need to reach out to our dedicated Enterprise team and they will get in touch with you as soon as possible to answer all of your questions. Let me show you where to find the request form:

    1. On your My Forms page, click on Enterprise on the upper-right side of the page.
    2. Then, on the upper-right side of the next page, click on Contact Sales.
    3. Fill out the form, click on the Send Request button, and that's it.

    How to Set the Date Picker Field to the Current Date on when the Form is Opened Image 1 Screenshot 20

    Let us know if there’s anything else we can help you with.