Set Specific Date Time Values

⏱ Tailor date and time values to your exact requirements.

1. Overview

This Interaction is to set specific date and time values for the Start Time and End Time fields. For example, it sets the Start Time to 9:00 AM and the End Time to 10:00 AM.

2. Example

This Interaction automatically sets the Start Time to 9:00 AM and the End Time to 10:00 AM when it's triggered.

async function handler(clev) {
    let actions = [];

    // Set the "Start Time" to 9:00 AM
    actions.push(
        clev.setValue(
            "start-time",
            clev.moment().set({ hour: 9, minute: 0 }).toISOString()
        )
    );

    // Set the "End Time" to 10:00 AM
    actions.push(
        clev.setValue(
            "end-time",
            clev.moment().set({ hour: 10, minute: 0 }).toISOString()
        )
    );

    return clev.mergeAll(actions);
}

📌 Need Help?

If you require assistance or encounter any issues, please don't hesitate to contact us for further support.