Date visibility

See also: Time visibility

Actions – Abstract

The Date visibility action displays or hides the date in a Date/Time element at runtime. This element can also be a component in a Date range.

The Date visibility action displays or hides the date in a Date/Time element at runtime. This element can also be a component in a Date range.

images/download/attachments/189436074/image-2024-10-29_9-47-41-version-1-modificationdate-1730191661001-api-v2.png

  • A 'Target element' of the Date/Time type must be linked so that the action appears under Action type.

  • The Display date option determines whether the date is shown (checked) or hidden (unchecked).

NOTE◄ If the time of a Date/Time element is not displayed when the date input area is hidden, the element may contract to a minimum. However, it does not disappear completely and remains relevant for a validation. If the element uses the Required field option or if Validators are configured, they will continue to be evaluated, although interactive access is no longer possible. If the validation triggers information texts, the field is automatically displayed wide enough for them to be readable.

Example

A planned tour should be entered in a form as a list of unloading points, each of which should specify the estimated time of arrival (ETA). The Date/Time element used should display a combination of date and time, unless the current date ('Today') is selected. In this case, a button labelled Today should appear instead of the date. When this is pressed, the date should appear again so that it can be changed if necessary.

Runtime example:

images/download/attachments/189436074/image2020-6-10_8-33-30-version-1-modificationdate-1730130431000-api-v2.png

  • The Date/Time element ETA appears for the first entries without date and in combination with the Today Button.

  • The last unloading point is only reached the following day. Here the ETA appears including the date.

Configuration:

images/download/attachments/189436074/image-2024-10-29_9-50-54-version-1-modificationdate-1730191853382-api-v2.png

Three behaviours are set up for the Date/Time element as shown on the left:

  • The first two behaviours ('afterToday' and 'beforeTomorrow') are not shown in detail here. They contain no actions and check by Behaviour type Compare with (Form designer), the value of the Date/Time element relative to the actual date. They form the basis for a Logical condition in the third behaviour ('Changed').


  • The behaviour 'Changed' is triggered by the Triggering event Changed and Focus out, so that the appearance around the date field can be adjusted as desired, depending on its value.


  • The Behaviour type Logical condition links the truth values from the 'afterToday' and 'beforeTomorrow' behaviours in an AND conjunction, which is fulfilled exactly when the date value of the executing element corresponds to the current date ('Today').


  • The Actions on "true" are executed when the date is 'Today'. Specifically, the 'Today' Button is displayed by Show element and the date in the Target element is hidden by Date visibility (with the option Display date not set).


  • If the date is not 'Today', the Actions on "false" will be executed. Specifically, the 'Today' Button is hidden by Hide element and the date in the Target element is displayed by Date visibility (with the option Display date set).

    NOTE◄ These actions are also configured for the behaviour that is triggered when you click the 'Today' Button. No details are given here.