createCalendarEvent
Reference
---@param data { title: string, description?: string, date: string, time?: string, imageUrl?: string }
---@return number|nil id -- The created event id, or nil if title or date were missing
function createCalendarEvent(data) end Creates a shared event (is_shared = 1) that every player sees in their Calendar app. date must be formatted YYYY-MM-DD. time is optional and formatted HH:MM. The returned id can later be passed to deleteCalendarEvent.
Usage example
local id = exports.fd_laptop:createCalendarEvent({
title = 'Server Maintenance',
description = 'Scheduled downtime for updates.',
date = '2026-08-01',
time = '02:00'
})
if id then
print('Created shared event', id)
end