Michael
Michael

Reputation: 13616

Show date in ui-grid table

I use ui-grid in my project to show some data and dates.

The example of date from ajax call is:

 DateReview='06/25/2016'

the format is mm/dd/yyyy in this format date is displayed.

Here the defenition of the ui-grid column:

   name: 'Start date', field: 'DateReview', cellTooltip: true, headerTooltip: true, width: 90 }

I need the date to be displayed in ui-grid in this format:

dd/mm/yyyy 

Any idea what is elegant way to change format of the displayed date in ui-gris column?

Upvotes: 2

Views: 1540

Answers (1)

KreepN
KreepN

Reputation: 8598

Here ya go:

{ name: 'Start date', field: 'DateReview', cellTooltip: true, headerTooltip: true, width: 90, type: 'date', cellFilter: "date:\'dd/MM/yyyy\'"}

Upvotes: 2

Related Questions