Skip to content

Commit bf2abe9

Browse files
committed
fixed dataFormat filter to receive strings
1 parent b991cde commit bf2abe9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/filters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function dateFormat(date, format, type) {
2121
type = _.defaultTo(type, 'strftime');
2222
let res;
2323
if (type === 'strftime') {
24-
res = strftime(format, date);
24+
res = strftime(format, _.isString(date) ? new Date(date) : date);
2525
} else if (type === 'moment') {
2626
res = moment(date).format(format);
2727
} else {

0 commit comments

Comments
 (0)