htmlangularformatdevexpressdevextreme

Title: Issue with Date Formatting in dxi-column Using DevExtreme in Angular


I am encountering an issue with formatting dates in the dxi-column component using the DevExtreme library in an Angular project. Below is the snippet of code that doesn't seem to be working as expected:

<dxi-column dataField="DtCrt"
           caption="Utworzenie wymagania"
           [allowEditing]="false"
           [format]="'MM/dd/yyyy'"></dxi-column>

I expected the date to be displayed in the 'MM/dd/yyyy' format, but it continues to appear in the default format. I have tried various formatting methods, but none have worked. Could anyone help me understand what I might be doing wrong or suggest what I could do differently to achieve the desired date format? Is there a specific way of formatting dates in DevExtreme that I should be aware of? Any suggestions or assistance would be greatly appreciated. Thank you!


Solution

  • If you want use Date Formatting format in dxi-column DevExtreme, you can do like this and this works!

    <dxi-column
      dataField="DtCrt"
      caption="Utworzenie wymagania"
      [allowEditing]="false">
      <dxo-format
         skeleton="yMd">
      </dxo-format>
    </dxi-column>
    

    you can see more information https://js.devexpress.com/Angular/Documentation/ApiReference/Common/Object_Structures/format/