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.


  • Profile Image

    Limit Date Range based on Second Date Range

    Asked by silver007 on August 18, 2015 at 08:22 AM

    if we have two date and time widget:

    Date of visit

    Date of discharge

    i know how to limit the date to the past or future, but what i need is to set the (Date of discharge) doesn't exceed the date was selected in the (date of visit), i mean from the date was selected in the (date of visit) till the recent date.

    regards. 

     

    Screenshot
    date and time selected and OR
  • Profile Image
    JotForm Support

    Answered by KadeJM on August 18, 2015 at 04:37 PM

    From what I understand of your request you mean that you want to find a way to make it so the First Date's Limit is not ahead of the discharge date? Is that correct? Or?

    Could you possibly explain this further or provide us with a written example so that we can get a better idea of what you seek?

    Currently what I am under the impression is that say Discharge Date was 8/19/15 then do you mean you want to have the Visit Date not go past that date? Or?

    Please confirm or correct me if needed.

  • Profile Image

    Answered by silver007 on August 19, 2015 at 12:02 AM

    ok thanks Mr. Kade,

    I will say that the date of visit or admission is on 8/19/15, then i want the date of dischrge to be after 8/19/15 and before today.

    many thanks  

  • Profile Image
    JotForm Support

    Answered by BJoanna on August 19, 2015 at 04:38 AM

    Unfortunately, you can not prevent users to choose "date of discharge" that is before "date of visit".

    Possible workaround is to add  Form calculation field that will calculate difference between dates and then if calculation is 1 or less you can use conditional logic to hide submit button so your users will not be able to submit your form if "date of discharge" is before "date of visit".

    http://www.jotform.com/help/259-How-to-perform-calculation-in-the-form  

    Here is my demo form: http://form.jotformpro.com/form/52302441507949? 

    Feel free to clone it if you want to take a closer look to my condition.

    Hope this will help. Let us know if you need further assistance.