Skip to content

Calendar - Web Component โ€‹

The Calendar component can be used imported from:

Playground โ€‹

Parameters โ€‹

The Web component uses the <z-calendar> tag:

By default, all the parameters are optional or can be set in different, except for the ones marked as required

The parametrization of the component can be done with the following custom HTML params:

NameTypeDescriptionSlotA11y
modelstringThe selected date.
first-weekdaystringThe first day of the week.
calendar-typestringThe calendar type.
localestringThe localization attribute.

Events โ€‹

This component has events. Check the documentation about how to use the events.

NamePayloadDescription
changestringFires when the selected date changes.
restartedvoidEmitted on value reset

Parameters use โ€‹

model โ€‹

By defining the model prop, you can set the initial value of the input.

first-weekday โ€‹

By defining the first-weekday prop, you can set the first day of the week. Possible values are sunday and monday. If not defined, the default value is monday.

calendar-type โ€‹

By defining the calendar-type prop, you can set the type of the calendar.

locale โ€‹

Attention!

The localization format of the input should come from the format settings of the client's operation system or browser. Check the localization docs.

By defining the locale prop, you can set the locale of the calendar. If not defined, the default will be the browser's locale.

Flags โ€‹

disabled โ€‹

The attribute disabled will block the interaction with the component.

Browser support โ€‹

Detected engine: ย 

  • Chromium

  • Webkit

  • Gecko

HTML Examples โ€‹

CodeSandbox example โ€‹