/
Date & Time

Date & Time

The date and time inputs provide a simple way for end users to pick values from a fixed set.

Date

To create an input for selecting a time, use the date input.

date
Figure 1. An input for picking a date, rendered in the web browser.
def formFieldSet = api.createConfiguratorEntry() formFieldSet.inputs = [ api.inputBuilderFactory() .createDateUserEntry('date') .buildContextParameter() ] return formFieldSet
api.inputBuilderFactory() .createDateUserEntry('date') .getInput()
processor.addOrUpdateInput( //❶ 'ROOT', api.inputBuilderFactory() .createDateUserEntry('date') .buildMap() )

❶ the processor can be one of the quoteProcessor, cProcessor, etc., which references subclasses of the CalculableLineItemCollectionBuilder

Reading input value in a line item logic

Time

To create an input for selecting a time, use the time input.

time
Figure 2. An input for picking a time, rendered in the web browser.

Reading input value in a line item logic

❶ You need to test if the pattern matches before you can extract groups by name.

Date Time

To create an input for selecting a combination of date and time, use the date-time input:

Reading input value in a line item logic

Date Range

To create an input for selecting a time period, use the date range input. You can select from the following period types:

  • DAY (default)

  • MONTH – A range from the first day of the selected month to the last day of the selected month.

  • QUARTER – A range from the first day of the selected quarter to the last day of the selected quarter.

  • YEAR – A range from the first day of the selected year to the last day of the selected year.

Reading input value in a line-item logic

Minimum and Maximum Values

You can restrict the input from the user by setting minimum and maximum dates.

As of version 7.3, the functionality for setting the minimum and maximum values has not been implemented in the frontend application. However, you can still set these properties in a Groovy logic.

Related content

How can I manipulate with datetimes?
How can I manipulate with datetimes?
More like this
Recommended Logic Structure for Line Item Calculation Logics
Recommended Logic Structure for Line Item Calculation Logics
More like this
How to Set up Default Value on Header Input and Copy It to Line Items
How to Set up Default Value on Header Input and Copy It to Line Items
More like this

Found an issue in documentation? Write to us.