Wednesday, February 27, 2019

Improved date and time controls

Orbeon Forms 2018.2 features new Date and Time form controls.

The reason the controls are new is that we wanted to modernize the date picker on one hand, and add new features such as the ability to exclude certain dates from the date picker on the other hand. This would have been very hard to do with the older controls which had a lot of history behind them. So we created a brand new Date control, and we used the opportunity to improve the Time control as well. The new controls are implemented as XBL components, which means they are more modular and easier to maintain.

Here is the new date picker with the January 5, 6, 12 and 13 dates unavailable (grayed out) using The "Dates to Exclude" constraint.




In addition, the controls have an option to take their "natural" (usually more narrow) width or, which is new, to fill a grid cell entirely to facilitate alignment.




You control whether a field takes its "natural" width or the full cell width from the "Control Settings" dialog, or globally for the form in the "Form Settings" dialog.



Here is another example showing different control widths, adjusting automatically to grid cell widths.



For backward compatibility, only forms created with Orbeon Forms 2018.2 default to having full width Date and Time controls, while forms created before that version default to the "natural" width. This can be changed in the control or form settings, or globally via a configuration property.

The legacy Date and Time controls remain available for the time being for backward compatibility scenarios, but new forms created with Form Builder, as well as existing forms loaded and republished from Form Builder, will automatically use the new controls.

We hope you will like these enhancements of Orbeon Forms 2018.2!

No comments:

Post a Comment