2
1
0

In a Maestro form if I have a textDisplay object with a reference to a date field, i.e. {{data.datePicker | date:'short' }}, I get a en_US date format, is there a way to specify another locale?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      The short answer is "not directly."

      The data.datePicker | date:'short' expression is Angular, using a filter to format a date value.  Angular gets the locale from the browser as the page initializes, and doesn't have an out of the box way to change that.

      What you can change is the filter in use.  You can even use a Data Field.

      short:  {{data.datePicker | date:'short'}}
      fullDate:  {{data.datePicker | date:'fullDate'}}
      custom: {{data.datePicker | date:data.dataField}}

      Where my data.dataField could be 'MM-dd-yyyy' or 'yyyy-MMM-dd'

      So you can definitely pick your format.

        CommentAdd your comment...