# OutlookCalendar(options: CalendarOptions)

Generates an Outlook Online Calendar instance.

import { OutlookCalendar } from 'datebook'

const options: CalendarOptions = {
  title: 'Happy Hour',
  location: 'The Bar, New York, NY',
  description: 'Let\'s blow off some steam with a tall cold one!',
  start: new Date('2022-07-08T19:00:00'),
  end: new Date('2022-07-08T23:30:00'),
  recurrence: {
    frequency: 'WEEKLY',
    interval: 2

const outlookCalendar = new OutlookCalendar(options)

# setHost(host: string): OutlookCalendar

Sets the host service type. The default host for Outlook is live.

Returns the OutlookCalendar instance.

# Valid hosts

  • live - For personal Outlook accounts (default).
  • office - For Office365 Outlook accounts.

# Example


# setParam(key: string, value: string): OutlookCalendar

Sets a parameter on the URL. This may be used to either set additional optional properties, or override existing ones. Pass a value of null to remove an existing property.

Returns the OutlookCalendar instance.

# Additional properties

  • online - Whether or not this meeting is an online (i.e., Skype) meeting. Set to any value except null for this property to take effect.

# Example

outlookCalendar.setParam('online', 'true')

# render()

Returns an Outlook Online Calendar (opens new window) URL to a page autofills a form in the online Outlook Online Calendar app with the event details.

# Example


# Result:


This will open a modal in Outlook Online calendar similar to the following:

Outlook Online Calendar result