You can configure Nuxt Calendar globally in your nuxt.config.ts file. All options are optional and come with sensible defaults.
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'
}
}
})
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:
Nuxt Calendar uses date-fns for formatting and date-fns-tz for timezone handling.
Set the locale property in the i18n object. The module supports all locales available in date-fns.
NuxtCalendar: {
i18n: {
locale: 'nl' // Dutch
}
}
Specify the timezone using an IANA identifier. All dates will be converted to this timezone for display.
NuxtCalendar: {
i18n: {
timezone: 'America/New_York'
}
}
When enableIcsExport is true, the module provides a useCalendarIcs composable and a server-side endpoint for generating .ics files.
When enableDatabaseSync is true, the module enables integration with NuxtHub (PostgreSQL) and provides the useCalendarDatabase composable for CRUD operations.
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'