Calendar#
- class omni.kit.widget.calendar.Calendar(date: ~.datetime.date, width: ~omni.ui._ui.Length | None = 210.000000px, height: ~omni.ui._ui.Length | None = 200.000000px, style: ~typing.Dict = None, show_combobox: bool = False, day_selected_handler: ~typing.Callable[[~omni.kit.widget.calendar.calendar.AbstractCalendarClass], None] = None, first_weekday: int = calendar.SUNDAY)#
Bases:
AbstractCalendarClassRepresents a calendar to show year month and day :keyword date: :kwtype date: datetime.date :keyword width: Widget widthl. Default ui.Pixel(210). Use None for auto. :kwtype width: Optional[ui.Length] :keyword height: Widget height. Default ui.Pixel(200). Use None for auto. :kwtype height: Optional[ui.Length] :keyword style: Widget additional style. Default None, means using default style. :kwtype style: Dict :keyword show_combobox: Show comboxbox for year/month or use button instead. :kwtype show_combobox: bool :keyword first_weekday: Set the first weekday, 0 = Monday…6 = Sunday. :kwtype first_weekday: int
- Functions:
set_date(dt: datetime.date): Change show date to dt.
- Properties:
year (int): Current show year. month (int): Current show month. day (int): Current show day.
Methods
__init__(date[, width, height, style, ...])set_date(dt)Attributes
YEAR_MAXYEAR_MINdaymonthyear- __init__(date: ~.datetime.date, width: ~omni.ui._ui.Length | None = 210.000000px, height: ~omni.ui._ui.Length | None = 200.000000px, style: ~typing.Dict = None, show_combobox: bool = False, day_selected_handler: ~typing.Callable[[~omni.kit.widget.calendar.calendar.AbstractCalendarClass], None] = None, first_weekday: int = calendar.SUNDAY)#