calendar.removeEvent()

Type Function
Return value none
Revision Release 2024.3703
Keywords calendar, event, remove, removeEvent
See also calendar.*

Overview

calendar.removeEvent() removes event with specified identifier.

Syntax

calendar.removeEvent( params )
params (required)

Table. Table containing call parameters - see next section for details.

Parameters table reference

listener (optional)

Listener. Listener that will receive removingEvent event.

eventId (required)

String. Identifier of the event to be removed.

Example

local calendar = require( "plugin.calendar" )

local function removeEventListener( event )
    -- check event.isError if required
end

 -- retrieve event id from getEvents or addEvent
local someEventId = nil

-- Add event with specified properties
calendar.removeEvent(
{
    listener = removeEventListener,
    eventId = someEventId,
}
)