The Date widget

Tags

1. What is the Date block?

The Date block allows your operators to enter a date during their interventions. The current date can be automatically filled in.

The Date block can be found within your editing studio, in the Tasks category.

image

2. Practically, how to use a Date block in my Ermeo form?

It is possible to set a default date. The default date can be modified by the operator or not. If you want the operator to be able to modify this default date, you need to activate the "Allow modification of the default value" option.

You can also set the current date as the default value. To do this, activate the "Current date" option.

You can also require the operator to enter dates that are only before or after the current date. For example, if you want the operator to schedule a new intervention date, it would be useful to activate the "Date greater than or equal to the current date" option.

You can also perform calculations on dates.

You can add or subtract days, months, or years from a date.

You can thus take the value of a first date, then add days, months, or years to it.

The formulas to insert in your date block will be:

  • Days: ##tag_date##+days(Number of desired days)
  • Months: ##tag_date##+months(Number of desired months)
  • Years: ##tag_date##+years(Number of desired years)

Context: Imagine a company performing building inspections. The operator must enter the current date when conducting their intervention. Therefore, you need to use the Date block.

  1. Drag and drop the Date block into your form. Name it "Inspection Date".
  2. In the settings, activate the "Current date" option.
  3. Publish your form. The Date block will be automatically filled with the intervention date.

3. Available options for this block

If you want to ensure that the chosen date is before or after the intervention date, you can activate the "Today" option, either under "Date before" or "Date after":

image

If you want to ensure that the chosen date is before or after another block's date, you can click on "Another block's date," either under "Date before" or "Date after."

You can also add a number of days to another block's date if you want to make the comparison more complex.

image