Base Calendar. When using a calendar (or any subclass), you can chose one of three available flows.
Basic Flow
The basic flow (available by default) implements 2 states:
- destroy state: the initial state
- show state: the calendar is displayed to the websurfer, and allows to select a date/time
To perform transitions from one basic state to another:
The basic flow relies on the default value of showOnInit
config which is true
.
Alternate Basic Flow
The alternate basic flow (also available by default) uses 3 states:
- destroy state: the initial state
- show state: the calendar is displayed to the websurfer, and allows to select a date/time
- hide state: the calendar is hidden from the websurfer
To perform transitions from one basic state to another:
The alternate basic flow relies on the default value of showOnInit
config which is true
.
Full Flow
When the showOnInit
config is set to false
,
the calendar instance then implement 4 successive states:
- destroy state: the initial state. No internal data is initialized (or all data is destroyed).
- init state: the calendar is initialized with fresh open hours and closed days, received from the server.
- show state: the calendar is displayed to the websurfer, and allows to select a date/time.
- hide state: the calendar is hidden from the websurfer. All internal data is kept alive.
At creation time (after new LnkWcb.Calendar()
is executed), the created instance is in the destroy state.
Transitions in the full flow are: