Mithun Pradhan

Mithun Pradhan

  • 1.6k
  • 150
  • 21.1k

How to show <ejs-grid date column format "dd-MM-yyyy" ?

Nov 8 2023 9:06 AM

My code

-----------------------

public class TestListViewModel
{

 public DateTime? CloseDate{ get; set; }

}

 

<ejs-grid id="Grid" dataSource="@Model.TestListViewModel" allowPaging="true"
          toolbar="toolbarItems" allowSorting="true" allowFiltering="true" allowTextWrap="true" allowSelection="true">
    <e-grid-filterSettings type="Menu"></e-grid-filterSettings>
      <e-grid-pagesettings pageSize="10" pageSizes="true" />
    <e-grid-columns>

        <e-grid-column type="checkbox"></e-grid-column>
        <e-grid-column field="CloseDate" headerText="Close Date" format="dd-MM-yyyy"></e-grid-column>
           </e-grid-columns>
</ejs-grid>

output

-----------------

Actual need to

Close Date :  03-11-2023


Answers (2)