• Will set the current date of the specified calendar to match the passed in date. Important: This function can only be run by users who have permission to change the date in Simple Calendar.

    Returns

    True if the date was set successfully, false otherwise.

    Example

    //To set the date to December 25th 1999 with the time 00:00:00
    SimpleCalendar.api.setDate({year: 1999, month: 11, day: 24, hour: 0, minute: 0, seconds: 0});

    //To set the date to December 31st 1999 and the time to 11:59:59pm
    SimpleCalendar.api.setDate({year: 1999, month: 11, day: 30, hour: 23, minute: 59, seconds: 59});

    Parameters

    • date: DateTimeParts

      A date object (eg {year:2021, month: 4, day: 12, hour: 0, minute: 0, seconds: 0}) with the parameters set to the date that the calendar should be set to. Any missing parameters will default to the current date value for that parameter.
      Important: The month and day are index based so January would be 0 and the first day of the month will also be 0.

    • calendarId: string = 'active'

      Optional parameter to specify the ID of the calendar to set the date of. If not provided the current active calendar will be used.

    Returns boolean