CalendarEvents
Events are represented as ordinary JavaScript Objects (see {@link com.smartgwt.client.widgets.calendar.CalendarEvent}). The Calendar expects to be able to read and write a basic set of properties on events: name, startDate, endDate, description, etc, which can be stored under configurable property names (see eg {@link com.smartgwt.client.widgets.calendar.Calendar#getStartDateField startDateField}.
Much like a {@link com.smartgwt.client.widgets.grid.ListGrid} manages it's ListGridRecords, the Calendar can either be passed an ordinaryArray of CalendarEvents or can fetch data from a DataSource.
If the calendar is bound to a DataSource, event changes by user action or by calling methods will be saved to the DataSource.
Navigation
The calendar supports a {@link com.smartgwt.client.widgets.calendar.Calendar#getWeekView WeekView}, {@link com.smartgwt.client.widgets.calendar.Calendar#getDayView DayView} and {@link com.smartgwt.client.widgets.calendar.Calendar#getMonthView MonthView} by default. The user can navigate using back andforward buttons or via an attached {@link com.smartgwt.client.widgets.calendar.Calendar#getDateChooser DateChooser}.
Event Manipulation
Events can be created via clicking on the day, week or month views, or via the "Add Event" button. In the day and week views, the user may click and drag to create an event of a specific duration.
Creating an event via click or click and drag pops up the {@link com.smartgwt.client.widgets.calendar.Calendar#getEventDialog EventDialog}, which provides a simple form for quick event entry (only one field, the description, is required by default).
A separate editor called the {@link com.smartgwt.client.widgets.calendar.Calendar#getEventEditor EventEditor} provides an interface for editing allpossible properties of an event, including custom properties. The EventEditor is used whenever a pre-existing event is being edited, and can also be invoked by the user wherever the simpler EventDialog appears.
Events can also be programmatically {@link com.smartgwt.client.widgets.calendar.Calendar#addEvent added}, {@link com.smartgwt.client.widgets.calendar.Calendar#removeEvent removed}, or {@link com.smartgwt.client.widgets.calendar.Calendar#updateEvent updated}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|