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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
10 additions and
2 deletions
-
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); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
/************************************************************************ |
|
|
|
|