Options
All
  • Public
  • Public/Protected
  • All
Menu

<drayman-calendar />

Calendar powered by angular-calendar library.

Example of usage

export const component: DraymanComponent = async ({ forceUpdate }) => {

    return () => {

        return (
            <drayman-calendar
                events={[
                    {
                        title: 'Event 1',
                        start: new Date().toISOString(),
                        end: new Date('2023-01-01').toISOString(),
                        id: 'event_1',
                        color: 'blue',
                    }
                ]}
                onEventClick={async ({ id }) => {
                    console.log(id);
                }}
                onDayClick={async ({ date }) => {
                    console.log(date);
                }}
            />
        );
    }
}

Hierarchy

Index

Properties

Optional events

events: { color: string; end?: string; id: any; start: string; title: string }[]

Array of events to be displayed in the calendar.

Optional onDayClick

onDayClick: ElementEvent<{ date: string }>

Executed when user clicks on a day.

Optional onEventClick

onEventClick: ElementEvent<{ id: any }>

Executed when user clicks on an event.

Optional ref

ref: string

Optional style

style: CSS