From 7b4a3011112ffea85558868de3a458254b2f13d4 Mon Sep 17 00:00:00 2001 From: Adam Driscoll Date: Sat, 18 May 2019 09:37:20 -0600 Subject: [PATCH] Fix grid tests. --- src/UniversalDashboard.Materialize/Components/custom-cell.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UniversalDashboard.Materialize/Components/custom-cell.jsx b/src/UniversalDashboard.Materialize/Components/custom-cell.jsx index 201be7a7..5045dd9b 100644 --- a/src/UniversalDashboard.Materialize/Components/custom-cell.jsx +++ b/src/UniversalDashboard.Materialize/Components/custom-cell.jsx @@ -20,8 +20,8 @@ export default class CustomCell extends React.Component { return {y.DateTime}; } } - else if (moment2.isValid) { - + else if (y.match && y.match(/^(\d{4})-(\d{1,2})-(\d{1,2})T/) != null) { + var moment2 = moment(y); if (moment2.isValid) { return {moment2.format(this.props.dateTimeFormat)}; }