Praman — AI-First SAP UI5 Test Automation Platform - v1.0.1
    Preparing search index...

    Function setDatePickerValue

    • Sets a date value on a sap.m.DatePicker control.

      Parameters

      • page: DatePage

        Playwright Page (or compatible subset).

      • controlId: string

        The ID of the DatePicker control.

      • date: DateInput

        The date to set (Date object or ISO string).

      • Optionaloptions: DateOptions

        Optional date operation settings.

      Returns Promise<void>

      Reads the control's valueFormat, converts the input accordingly, then calls setValue() and fireChange({valid: true}) in a single evaluate script.

      await setDatePickerValue(page, 'datePicker1', new Date(2024, 0, 15));
      await setDatePickerValue(page, 'datePicker1', '2024-01-15');