Praman — Agent-First SAP UI5 Test Automation Plugin - v1.2.0
    Preparing search index...

    Function formatDateForUI5

    • Ai

      Formats a Date object into a UI5-compatible date string.

      Parameters

      • date: DateInput

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

      • format: string

        The target format pattern.

      Returns string

      The formatted date string.

      ui5.date.setDatePicker

      Convert a Date to a UI5 date format string for use with DatePicker controls.

      Returns a correctly formatted date string matching the specified pattern.

      Pure function (no browser context). Supports ISO, SAP_INTERNAL, EUROPEAN, US, JAPANESE formats. Use to prepare date values before passing to setDatePickerValue().

      sap.m.DatePicker — valueFormat conversion

      Format dates for SAP UI5 date picker controls with locale-aware patterns.

      Pure function (no browser context). Supports the five patterns in DATE_FORMATS.

      ControlError if the format is unsupported or the date is invalid.

      formatDateForUI5(new Date(2024, 0, 15), 'yyyy-MM-dd'); // '2024-01-15'
      formatDateForUI5(new Date(2024, 0, 15), 'dd.MM.yyyy'); // '15.01.2024'