# ef-calendar

Standard calendar element

## Properties

| Property         | Attribute           | Type                     | Default | Description                                      |
|------------------|---------------------|--------------------------|---------|--------------------------------------------------|
| `disabled`       | `disabled`          | `boolean`                | false   | Set disabled state                               |
| `fillCells`      | `fill-cells`        | `boolean`                | false   | Fill head and tail cell dates                    |
| `filter`         |                     | `CalendarFilter \| null` | null    | Custom filter, used for enabling/disabling certain dates |
| `firstDayOfWeek` | `first-day-of-week` | `number \| null`         | null    | Set the first day of the week.<br />0 - for Sunday, 6 - for Saturday |
| `max`            | `max`               | `string`                 | ""      | Set maximum date                                 |
| `min`            | `min`               | `string`                 | ""      | Set minimum date                                 |
| `multiple`       | `multiple`          | `boolean`                | false   | Set to switch to multiple select mode            |
| `range`          | `range`             | `boolean`                | false   | Set to switch to range select mode               |
| `readonly`       | `readonly`          | `boolean`                | false   | Set readonly state                               |
| `value`          | `value`             | `string`                 | ""      | Current date time value                          |
| `values`         | `values`            | `string[]`               | []      | Set multiple selected values                     |
| `view`           | `view`              | `string`                 | ""      | Current calendar view date                       |
| `weekdaysOnly`   | `weekdays-only`     | `boolean`                | false   | Only enable weekdays                             |
| `weekendsOnly`   | `weekends-only`     | `boolean`                | false   | Only enable weekends                             |

## Events

| Event                | Description                                      |
|----------------------|--------------------------------------------------|
| `before-cell-render` | Fired before calendar renders each cell along with `cell` model. |
| `value-changed`      | Fired when the user commits a date change. The event is not triggered if `value` is changed programmatically. |
| `view-changed`       | Fired when the user changes a view of calendar e.g. changed to next month page. The event is not triggered if `view` property is changed programmatically. |

## Slots

| Name         | Description                                      |
|--------------|--------------------------------------------------|
| `footer`     | Adds slotted content into the footer of the calendar control |
| `yyyy-MM-dd` | Adds slotted content into the specific date which use value in `ISO8601` date string format as a key e.g. `yyyy-MM-dd`, `yyyy-MM` and `yyyy` |
