#include <Ext/Calendar>
Public Member Functions | |
Calendar (bool i18n=false, WContainerWidget *parent=0) | |
Create a new calendar. | |
void | select (const WDate &date) |
Select a date. | |
const std::set< WDate > & | selection () const |
Get the current selection. | |
Public Attributes | |
Signal< void > | selectionChanged |
Signal emitted when the user changes the selection. | |
Signal< void > | selected |
Signal emitted when the user has selected a date. |
The calendar provides navigation by month and year, and indicates the current day.
The calendar only allows selection of a single day, and you may listen for when the user selects a new date using the selected singal.
The API is a subset of the WCalendar API:
Here is a snapshot taken on 01/09/2007 (shown as today), and 12/09/2007 currently selected.
Calendar
Wt::Ext::Calendar::Calendar | ( | bool | i18n = false , |
|
WContainerWidget * | parent = 0 | |||
) |
Create a new calendar.
Constructs a new calendar, with optional support for internationalization. The calendar shows the current day, and has an empty selection.
void Wt::Ext::Calendar::select | ( | const WDate & | date | ) |
Select a date.
Select one date.
const std::set<WDate>& Wt::Ext::Calendar::selection | ( | ) | const [inline] |
Get the current selection.
Returns the set of dates currently selected. This set contains 0 or 1 dates.
Signal emitted when the user changes the selection.
Emitted after the user has changed the current selection, before the selected signal is emitted.
Signal emitted when the user has selected a date.
This signal indicates that the user has selected a new date, which is only available when in single selection mode.