In you ag-Grid
if you want to display date field in specific format do the following steps
- npm Install moment --save
- in your .ts file use below
columnDefs =
[{
headerName: 'Effective Start
Date',
field: 'EffectiveStartDate',
cellRenderer: (data) => {
return data.value ? (moment(data.value).format('MM/DD/YYYY')) : '';}
}];
For more info on moment please use https://momentjs.com/
No comments:
Post a Comment