Search.../

options

Gets the options that relate to the date picker or appointment field view change event.

Type:

ViewChangeEventOptionsRead Only
NAME
TYPE
DESCRIPTION
startDate
Date

Start date of the currently displayed month.

endDate
Date

End date of the currently displayed month.

operationResult
*

Result returned by the operation.

Was this helpful?

Get the event options of the target element

Copy Code
1$w.onReady(function () {
2 $w('#myAppointmentField').onViewChange(viewChangeHandler, viewChangeOperation, 3);
3});
4
5export async function viewChangeOperation({ operationOptions }) {
6 const { startDate, endDate } = operationOptions;
7 let enabledDates = await myGetEnabledDatesFunction({ startDateTime: startDate, endDateTime: endDate })
8 return slots
9}
10
11export async function viewChangeHandler(event) {
12 const { options } = event;
13 const slots = options.operationResult.enabledDates;
14}