Skip to content

Commit 857598b

Browse files
committed
converters / datetime - ignore empty values
1 parent 36fbba7 commit 857598b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/public.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ Grid.defaults = {
260260
datetime: {
261261
// convert datetime type fields from unix timestamp to readable format
262262
from: function (value) {
263-
return moment(parseInt(value)*1000);
263+
return value ? moment(parseInt(value)*1000) : "";
264264
},
265265
to: function (value) {
266-
return value.format("lll");
266+
return value ? value.format("lll") : "";
267267
}
268268
},
269269
memsize: {

0 commit comments

Comments
 (0)