daysBetweenDates can be used to get elapsed days between two dates.
Arguments:
| Name | Type | Description | Example |
|---|---|---|---|
startDateStr |
string | the start date to use for calculation | 11-11-2023 |
endDateStr |
date string or TODAY |
the end date to use for calculation | 11-11-2023 or TODAY |
format |
string | the date format to expect | 'MM-DD-YYYY' | 'MM/DD/YYYY' | 'DD-MM-YYYY' | 'DD/MM/YYYY' |
Returns: number | undefined
Example:
"expressions": {
"props.hideField": "field?.parent?.parent?.parent?.parent?.model?.SECTION_KEY?.BLOCK_KEY?.DATE_PICKER_KEY !== undefined && IremboDefinitions.daysBetweenDates(field?.parent?.parent?.parent?.parent?.model?.SECTION_KEY?.BLOCK_KEY?.DATE_PICKER_KEY, 'TODAY', 'DD/MM/YYYY') > 15"
},
Here the said input with the expression will only be visible when the selected date is more than 15 days ago from today.