Office.AppointmentTimeChangedEventArgs interface

提供引发 Office.EventType.AppointmentTimeChanged 事件的约会的当前日期和时间。

注解

[ API set: Mailbox 1.7 ]

示例

// Adds an event handler for the AppointmentTimeChanged event.
Office.onReady(() => {
    document.addEventListener('DOMContentLoaded', () => {
        // Get a reference to the mailbox and use it to add an event handler.
        const mailbox = Office.context.mailbox;
        mailbox.addHandlerAsync(Office.EventType.AppointmentTimeChanged, appointmentTimeChangedHandler, (result) => {
            if (result.status === Office.AsyncResultStatus.Failed) {
                console.error(`Failed to add event handler: ${asyncResult.error.message}`);
                return;
            }

            console.log("Event handler added successfully.");
        });
    });
});

// Handles the AppointmentTimeChanged event.
function appointmentTimeChangedHandler(event) {
    console.log(`Event: ${event.type}`);
    console.log(`Start time: ${event.start}`);
    console.log(`End time: ${event.end}`);
}

属性

end

获取约会结束日期和时间。

start

获取约会开始日期和时间。

type

获取事件的类型。 有关详细信息,请参阅 Office.EventType

属性详细信息

end

获取约会结束日期和时间。

end: Date;

属性值

Date

注解

[ API set: Mailbox 1.7 ]

start

获取约会开始日期和时间。

start: Date;

属性值

Date

注解

[ API set: Mailbox 1.7 ]

type

获取事件的类型。 有关详细信息,请参阅 Office.EventType

type: "olkAppointmentTimeChanged";

属性值

"olkAppointmentTimeChanged"

注解

[ API set: Mailbox 1.7 ]