PeriodStruct Property Editor | Xafari Framework

PeriodStruct Property Editor is intended for Xafari.Base.PeriodStruct property. This property allows you to store various time interval values. It is very useful to filter the list by a column containing DateTime value. PeriodStruct Property Editor used in Xafari Extra Filters.

Let see an example with Timetable object:

Note, that WorkPeriod property is persistent and decorated with appropriate attribute.

To see, how to activate PeriodStruct Property Editor refer to the documentation. PeriodStruct Property Editor ( PeriodStruct Web Property Editor) is a default editor for PeriodStruct type.

Win-version has a more rich user interface, which allows to set period in several ways:

- Set start date and end date:

- Set period explicitly

Win version provides several ready-to-use periods, such as Year, Quarter, Month etc. It greatly facilitates the task to set time intervals.

Web-version provides only one way: to set start-date and end-date.

PeriodStruct Property Editor controls that the start-date is less than the end-date. It allows the user to avoid possible errors, and thus improve its performance.

As you can see in the image above, the value of the start and end of the interval mutually limit each other. The user can not set end value less than the start of the interval. Calendar displays invalid values in gray, that informs the user of the impossibility of their choice.

To use PeriodStruct to filter, you must configure the Application Model. Navigate to the business object node and set PeriodFilterProperty.

Application Model will expose PeriodFilterProperty after adding Xafari.Filters and Xafari.Filters.Win modules. The special Popup Container Show Action will be displayed in the UI. Set period and the list will be filtered by the column specified in Application Model (i.e. EmployeePlacementDate).

Sample: DateEditors.