Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Date and time widget

The date or time widget is used to display or set a date or time variable. The format can be specified by a format pattern string or an ILocale object. The field order and delimiter are configurable. 

The figure below shows an example of the date and time widgets.

For additional information, refer to the http://developer.brewmp.com/reference/api-all.

Required Files

AEEDateTimeWidget.h

AEECJulianDateWidget.h

AEECJulianTimeWidget.h

Class IDs

AEECLSID_CJulianDateWidget

AEECLSID_CJulianTimeWidget

This topic describes two similar widgets -- a date widget and a time widget -- each of which is used to display and set a date/time variable. These widgets share common behaviors, such as how they handle events or interact with their attached model, but differ in what fields they contain and what data they expose from their model.

Features common to both the date and time widgets:

  • Automatic field verification and date/time validation.
  • Field order is configurable
  • Fields specified by a format pattern string or ILocale object
  • Field delimiter specified by a string or ILocale object
  • Value model updating and notification performed in two different configurable modes, on field change or on focus change.
  • Fields auto-incremented and decremented with the up/down arrow keys.

The julian date and julian time widgets rely on a value model that contains a julian date structure (rather than a uint32) representing the date and time. A default model is created and assigned to the widget when the widget is created with ISHELL_CreateInstance(). The client can replace the widget's model at any time with IWidget_SetModel(), as long as the supplied model interface is of the type that the widget expects.

The julian date and julian time widgets both perform validation of the AEEDateTime date structure set in their model to ensure a valid date is stored and displayed. If an invalid date is passed in, the widgets will change the offending fields to make the date valid. This keeps their behavior in line with their non-julian counterparts.

The data supplied in the value model must be of type AEEDateTime.