Skip to main content
June 27, 2023
Question

Date validation

  • June 27, 2023
  • 2 replies
  • 0 views

Hi,

I am working on a date validation, where I want the date format based on various user locale to be converted into a common date format "dd/MM/yyyy". I am using "datetext()" function and it gets converted into the desired format whenever I tried to enter the value based on the user's calender format. But whenever I tried for other test scenarios, it fails. For example: If I enter date as "dd.MM.yyyy" in the expression of the test inputs, then in the value of the test input, I don't get the entered date in the desired format("dd/MM/yyyy") . I need every date formats of the various user locales to be converted into "dd/MM/yyyy". Please provide some suggestions.

Thank you.

    2 replies

    mathieud0001
    June 27, 2023

    The DateField component doesn't support different formats for date entry. You would need a text field to do this which I don't recommend.

    stefanhelzle0001
    June 27, 2023

    There is no magic that can reliably convert ANY format into a date. Why not use a date picker?