-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I am using a service to populate data in the table.
I am getting a date fields in the following format: MM/DD/YYYY.
ngx-magic-table loads the table with all the data but throws an error while trying to format the date,
Cannot read property 'getMonth' of null.
Will it not work unless I have the date in ISO 8601 format?
Gives an error irrespective of if I use format.
Trying to use it like this:
public columns: Array = [
{ field: 'Date', title: 'Date', className: ['ng-header'], format: 'MM/dd/yyyy'},
{ field: 'HolidayName', title: 'Holiday Desc', className: ['ng-header']},
{ field: 'Edit', title: 'Edit',
className: ['ng-header'],
actions: {
type: 'simple',
buttons: [
{
title: 'Edit',
styleClass: 'btn btn-primary',
styleIcon: 'fa fa-pencil',
action: 'edit'
}
]
}},
{ field: 'Delete', title: 'Delete',
className: ['ng-header'],
actions: {
type: 'simple',
buttons: [
{
title: 'Delete',
styleClass: 'btn btn-danger',
styleIcon: 'fa fa-times',
action: 'delete'
}
]
}}
];
Please look into this @eronalves @MiltonQuirino. I will appreciate all your help here.
Thanks.