maia-calendar
v0.0.2
Published
Web component for MAIA's calendar.
Downloads
1
Readme
MAIA Calendar Component
Web component for MAIA's calendar.
Installation
$ npm install --save maia-calendar
Usage
Import as ES module:
import "maia-calendar"
With a script tag:
<script type="module" src="./node_modules/maia-chat-element/dist/maia-calendar.umd.js"></script>
Importing Ionicons library is required:
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>```
Markup
The Maia Calendar component expects an array of date strings in the following format:
Date format: YYYY-MM-DDTHH:mm:ss
Example:
const dates = [
'2023-07-07T11:00:00',
'2023-07-08T14:30:00',
'2023-07-09T09:15:00'
];
<maia-calendar .dateTimeList="${dates}" @date-selected="${this.handleEventFunction}"></maia-calendar>
Properties
| Property | Description | Required | |-----------------------------|-----------------------------------------------------|----------| | dateTimeList | An array of strings in YYYY-MM-DDTHH:mm:ss | yes |
Events
| Event | Description | |-----------------------------|-----------------------------------------------------| | date-selected | Dispatched when a date is selected in the calendar. |