- Cristallina83Asked on February 23, 2018 at 05:01 PM
Hi again Richie,
is there a way I can have a sort of add-on to help me calculating how many nights are selected?
I have check-in date: 04.06.2018 and check-out date at 08.06.2018. It is 4 nights stay.
Is there a widget that inserting a date for check-in and check-out automatically calculates me the nights?
Thanks in advance.
- JotForm SupportEltonCrisAnswered on February 23, 2018 at 05:21 PM
If you are using the date picker fields, that is possible using the update/calculation condition. Guide: https://www.jotform.com/help/268-How-to-Insert-Text-or-Calculation-into-a-Field-Using-Conditional-Logic
There's also a widget that is designed for this purpose https://widgets.jotform.com/widget/dates_difference
To get the date difference value, just use form calculation widget and add the date difference widget in the calculation wizard.
- Cristallina83Answered on February 23, 2018 at 05:49 PM
Thank you so much Elton.
Is it possible to see just the number without any other character?
I show you how it shows.
It says: difference: 2 days.
I would like to see only the number 2 if possible.
Thanks for your support!
- JotForm SupportKevin_GAnswered on February 23, 2018 at 08:52 PM
You should make sure that the date differences widget returns the difference only:
Once you have done this, you need to change the field included on the form calculation widget, click on it to include it as numeric value instead of text:
I hope this helps.
- Cristallina83Answered on February 24, 2018 at 07:35 AM
Thank you Kevin!
I did it and it works perfectly!