Source code for dazzler.components.calendar._calendar

"""Autogenerated file: DO NOT EDIT!"""
import typing  # noqa: F401
from dazzler.system import Component, Aspect, UNDEFINED  # noqa: F401


[docs]class Calendar(Component): """ Display a calendar based on the month of a timestamp. :CSS: - ``dazzler-calendar-calendar`` - ``calendar-header`` - ``month-label`` - ``week-labels`` - ``week-label`` - ``calendar-day`` - ``selected-day`` - ``week-rows`` - ``calendar-week`` - ``empty`` """ month_timestamp = Aspect(docstring="Timestamp of the month to show. If not supplied is today.") # noqa: E501 selected = Aspect(docstring="The currently selected day as an object") month_format = Aspect(default='MMMM YYYY', docstring="Formatting of the month label (default='MMMM YYYY')") # noqa: E501 week_labels = Aspect(default=UNDEFINED, docstring="Labels for the week, starting from sunday. (default=['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'])") # noqa: E501 use_selected = Aspect(default=True, docstring="Whether to set selected aspect on click/start up.This will disable highlight of day in the calendar. (default=True)") # noqa: E501 class_name = Aspect(docstring="Class name automatically added by dazzler api with a prefix for the component library.ie: core component Container become ``dazzler-core-container``.When added on the component, the class names will be concatenated.") # noqa: E501 style = Aspect(docstring="Style object for the top level wrapper of the component.") # noqa: E501
[docs] def __init__( self, month_timestamp: typing.Optional[typing.Union[float, int]] = UNDEFINED, # noqa: E501 selected: typing.Optional[typing.Dict[str, typing.Union[typing.Union[float, int]]]] = UNDEFINED, # noqa: E501 month_format: typing.Optional[str] = 'MMMM YYYY', week_labels: typing.Optional[typing.List[str]] = UNDEFINED, use_selected: typing.Optional[bool] = True, class_name: typing.Optional[str] = UNDEFINED, style: typing.Optional[typing.Dict] = UNDEFINED, identity: str = None ): """ :param month_timestamp: Timestamp of the month to show. If not supplied is today. :param selected: The currently selected day as an object :param month_format: Formatting of the month label (default='MMMM YYYY') :param week_labels: Labels for the week, starting from sunday. (default=['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']) :param use_selected: Whether to set selected aspect on click/start up. This will disable highlight of day in the calendar. (default=True) :param class_name: Class name automatically added by dazzler api with a prefix for the component library. ie: core component Container become ``dazzler-core-container``. When added on the component, the class names will be concatenated. :param style: Style object for the top level wrapper of the component. """ Component.__init__(self, locals(), identity)