Skip to content

Calendar

addPhoneCalendar

TIP

The API usage is as follows: wx.addPhoneCalendar(Object object)

  • Functional description: Add events to system calendar
  • Parameters and descriptions: Object object。
    PropertiesTypeDefault valueRequiredDescription
    titlestring-YesCalendar event title
    startTimenumber-YesUnix timestamp of start time
    allDayboolean-NoIs it an all-day event, default is false
    descriptionstring-NoEvent description
    locationstring-NoEvent location
    endTimestring-NoUnix timestamp of end time, default is the same as start time
    alarmboolean-NoWhether to remind, default is true
    alarmOffsetnumber-NoReminder advance, unit: seconds, default 0 means reminder at the beginning
    successFunction-NoCallback function for successful interface call
    failFunction-NoCallback function for failed interface call
    completeFunction-NoCallback function for interface call completion (executed regardless of success or failure)

addPhoneRepeatCalendar

TIP

The API usage is as follows: wx.addPhoneRepeatCalendar(Object object)

  • Functional description: Add recurring events to system calendar

  • Parameters and descriptions: Object object。

    PropertiesTypeDefault valueRequiredDescription
    titlestring-YesCalendar event title
    startTimenumber-YesUnix timestamp of start time
    allDayboolean-NoIs it an all-day event, default is false
    descriptionstring-NoEvent description
    locationstring-NoEvent location
    endTimestring-NoUnix timestamp of end time, default is the same as start time
    alarmboolean-NoWhether to remind, default is true
    alarmOffsetnumber-NoReminder advance, unit: seconds, default 0 means reminder at the beginning
    repeatIntervalstring-NoRepeat cycle, default month means repeat every month
    repeatEndTimenumber-NoUnix timestamp of end time of repeat cycle, if not filled in means repeating all the time
    successFunction-NoCallback function for successful interface call
    failFunction-NoCallback function for failed interface call
    completeFunction-NoCallback function for interface call completion (executed regardless of success or failure)
  • repeatInterval

    Legal valueDescription
    dayRepeat every day
    weekRepeat every week
    monthRepeat every month The mode date cannot be greater than 28 days
    yearRepeat every year