Essentials

Configuration

Customize Nuxt Calendar to fit your application's needs.

You can configure Nuxt Calendar globally in your nuxt.config.ts file. All options are optional and come with sensible defaults.

Module Options

nuxt.config.ts
export default defineNuxtConfig({
  NuxtCalendar: {
    // License key for Pro features
    licenseKey: 'YOUR_LICENSE_KEY',

    // Time format for display ('12h' or '24h')
    timeFormat: '24h',
    
    // Internationalization settings
    i18n: {
      locale: 'en',           // 'en', 'nl', 'de', 'fr', etc.
      timezone: 'UTC',        // IANA timezone identifier
      weekStartsOn: 1,        // 0 = Sunday, 1 = Monday
    },
    
    // Enable/disable features
    enableIcsExport: true,
    enableIcsImport: true,
    enableDatabaseSync: false,
    
    // Teams configuration (Pro feature)
    teams: {
      label: 'Calendars',
      title: 'My Company Calendar',
      visible: true
    },

    // Company branding
    company: {
      name: 'My Company',
      logo: '/logo.png'
    }
  }
})

Pro Features

Some features require a NuxtCalendar Pro license. You can obtain a license key at nuxtcalendar.com.

To enable Pro features, add your license key to the configuration:

NuxtCalendar: {
  licenseKey: process.env.NUXT_CALENDAR_LICENSE_KEY
}

The following features are exclusive to the Pro version:

  • Database Sync: Persist events to PostgreSQL via NuxtHub.
  • Teams: Manage multiple calendars and team members.
  • ICS Import/Export: Full integration with external calendar services.

Internationalization

Nuxt Calendar uses date-fns for formatting and date-fns-tz for timezone handling.

How do I change the locale?

Set the locale property in the i18n object. The module supports all locales available in date-fns.

NuxtCalendar: {
  i18n: {
    locale: 'nl' // Dutch
  }
}

How do I handle different timezones?

Specify the timezone using an IANA identifier. All dates will be converted to this timezone for display.

NuxtCalendar: {
  i18n: {
    timezone: 'America/New_York'
  }
}

Feature Flags

ICS Export

When enableIcsExport is true, the module provides a useCalendarIcs composable and a server-side endpoint for generating .ics files.

Database Sync

When enableDatabaseSync is true, the module enables integration with NuxtHub (PostgreSQL) and provides the useCalendarDatabase composable for CRUD operations.

TypeScript Support

The configuration is fully typed. If you're using VS Code, you'll get autocomplete and type checking for all options automatically.

import type { ModuleOptions } from '@shiftesc/nuxt-calendar'