Date ranges and validation

Make entering date ranges easier and allow for validation

Important: This demo form requires an additional script to function correctly. You can download it via the following button. Then upload the script under Files & Templates > Files or directly at the form under Files.

This form illustrates how to setup validation for a date range. The datepicker is adjusted so that the user can only select valid date ranges.

 

The end date must always be after or at least equal to the start date!

When is your next holiday planned (future)?

Enable JavaScript to see the sample code


When was your last holiday (past)?

Enable JavaScript to see the sample code


When is a good time to travel abroad?
Enable JavaScript to see the sample code

When did the journey begin and end?
Enable JavaScript to see the sample code

When did the project start and will it end?
Enable JavaScript to see the sample code

Special date request
Enable JavaScript to see the sample code

Second selection only in the same month
Enable JavaScript to see the sample code

Example for multiple dates in one container for date in future

The procedure for the other date functions is always the same. Only the function name has to be changed.

Enable JavaScript to see the sample code