Customize datesDifference

  • Profile Image
    lundo
    Asked on August 13, 2019 at 04:15 PM

    I am trying to help another user create a reservation form, https://www.jotform.com/form/92187854069167. There are two rooms at different rates. We're using Date Reservation to show available dates for the two rooms. But actual reservations are currently made using the Date Differences form, which presents two text boxes with input facilitated using Date Picker. 
    Is there a way to allow start/end dates to be picked directly on the Date Reservation calendars, and then fed to date diff, instead of using text fields?
    Also, instead of date diff simply giving number of nights between start end, we need number of weekdays and number of weekend nights. Is it possible to do this? Or do I need to write a completely new date diff thing?

  • Profile Image
    IvayloK
    Answered on August 13, 2019 at 05:19 PM

    I checked the Date Reservation widget and did some tests and possible workarounds. However, it seems that it is not possible to extract the day and set a calculation value to them.

    A possible workaround would be to use a multiple choice field with the dates as the options. Then manually set a calculation value to each options. Guide:

    https://www.jotform.com/help/301-How-to-Assign-Calculation-Value

    In order to receive only weekdays or weekend nights, you can exclude specific days in the widget (Dates Difference) settings.

    1565731048chrome_t9MsVWhcYZ.png

    Please try the above and let us know, how it works for you.