class CalendarGrid
package feathers.controls
extends FeathersControl › MeasureSprite › ValidatingSprite
implements IDateSelector
Displays a calendar for a specific month.
The following example creates a CalendarGrid
, selects a date, and listens
for when the selection changes:
var calendar = new CalendarGrid();
calendar.displayedFullYear = Date.now().getFullYear();
calendar.displayedMonth = Date.now().getMonth();
calendar.selectedDate = Date.now();
calendar.addEventListener(Event.CHANGE, (event:Event) -> {
var calendar = cast(event.currentTarget, CalendarGrid);
trace("CalendarGrid changed: " + calendar.selectedDate);
});
this.addChild(calendar);
Events:
openfl.events.Event.CHANGE | Dispatched when
|
---|---|
openfl.events.Event.SCROLL | Dispatched when
|
1.0.0
.See also:
Static variables
staticfinalread onlyCHILD_VARIANT_DATE_TOGGLE_BUTTON:String = "calendarGrid_dateToggleButton"
The variant used to style the ToggleButton
child components from the
current month in a theme.
To override this default variant, set the
CalendarGrid.customToggleButtonVariant
property.
1.0.0
.See also:
staticfinalread onlyCHILD_VARIANT_MUTED_DATE_TOGGLE_BUTTON:String = "calendarGrid_mutedDateToggleButton"
The variant used to style the ToggleButton
child components that are
not from the current month in a theme.
To override this default variant, set the
CalendarGrid.customMutedToggleButtonVariant
property.
1.0.0
.See also:
staticfinalread onlyCHILD_VARIANT_WEEKDAY_LABEL:String = "calendarGrid_weekdayLabel"
The variant used to style the Label
child components that display the
names of weekdays.
To override this default variant, set the
CalendarGrid.customWeekdayLabelVariant
property.
1.0.0
.See also:
Constructor
Variables
read onlyactualLocaleIDName:String
The locale ID name that is being used, which may be different from the requested locale ID name.
1.0.0
.See also:
backgroundSkin:DisplayObject
The default background skin to display behind the calendar's content.
The following example passes a bitmap for the calendar to use as a background skin:
calendar.backgroundSkin = new Bitmap(bitmapData);
1.0.0
.See also:
customMutedToggleButtonVariant:String
An optional custom variant to use for the toggle buttons that represent
dates in the adjacent months, instead of
CalendarGrid.CHILD_VARIANT_MUTED_DATE_TOGGLE_BUTTON
.
1.0.0
.See also:
customStartOfWeek:Null<Int>
The index of the day that starts each week. 0
is Sunday and 6
is
Saturday. Set to null
to use the default.
1.0.0
.customToggleButtonVariant:String
An optional custom variant to use for the toggle buttons that represent
dates in the current month, instead of
CalendarGrid.CHILD_VARIANT_DATE_TOGGLE_BUTTON
.
1.0.0
.See also:
customWeekdayLabelVariant:String
An optional custom variant to use for the labels that display the names
of weekdays, instead of CalendarGrid.CHILD_VARIANT_WEEKDAY_LABEL
.
1.0.0
.See also:
customWeekdayNames:Array<String>
A custom set of weekday names to use instead of the default.
1.0.0
.disabledBackgroundSkin:DisplayObject
A background skin to display behind the calendar's content when the calendar is disabled.
The following example gives the calendar a disabled background skin:
calendar.disabledBackgroundSkin = new Bitmap(bitmapData);
calendar.enabled = false;
1.0.0
.See also:
displayedFullYear:Int
Along with the displayedMonth
, sets the month that is currently
visible in the calendar. Defaults to the current year.
1.0.0
.See also:
displayedMonth:Int
Along with the displayedFullYear
, sets the month that is currently
visible in the calendar. Defaults to the current month.
Months are indexed starting from 0
. So the index of January is 0
,
and the index of December is 11
.
1.0.0
.See also:
requestedLocaleIDName:String
showDatesFromAdjacentMonths:Bool
Determines if the toggle buttons for dates in the adjacent months are visible or not.
1.0.0
.