Browse Source

Merge pull request #8639 from abpframework/cotur/datatables

handle null values on datatables date dataformat
pull/8644/head
liangshiwei 5 years ago
committed by GitHub
parent
commit
b71dabe37f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js

12
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js

@ -462,11 +462,19 @@ var abp = abp || {};
};
datatables.defaultRenderers['date'] = function (value) {
return (ISOStringToDateTimeLocaleString())(value);
if(!value) {
return value;
} else {
return (ISOStringToDateTimeLocaleString())(value);
}
};
datatables.defaultRenderers['datetime'] = function (value) {
return (ISOStringToDateTimeLocaleString(luxon.DateTime.DATETIME_SHORT))(value);
if(!value) {
return value;
} else {
return (ISOStringToDateTimeLocaleString(luxon.DateTime.DATETIME_SHORT))(value);
}
};
/************************************************************************

Loading…
Cancel
Save