Skip to content

Calendar - Web Component

Browser support

Detected engine:  

  • Chromium

  • Webkit

  • Gecko

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:

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

The events emitted from the component are:

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

value

By defining the value 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 comes from the format settings of the client's operation system.

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

The calendar component it's highly customizable. You can use the --z-calendar--header--bg, --z-calendar--header--color, --z-calendar--bg, --z-calendar--color and --z-calendar--radius to customize the background and color of the header, the background and color of the calendar, and the radius of the calendar.

Playground

Customization

HTML Examples

StackBlitz example