Skip to content

Commit

Permalink
Merge pull request #826 from ironmansoftware/811
Browse files Browse the repository at this point in the history
Fixes #811
  • Loading branch information
adamdriscoll committed May 24, 2019
2 parents 787dc3b + 824c233 commit 37b9de3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/UniversalDashboard.Materialize/Components/custom-cell.jsx
Expand Up @@ -6,13 +6,12 @@ export default class CustomCell extends React.Component {
const validComponents = ["link", "icon", "image", "element"]

var y = this.props.value;
var moment2 = moment(y);

if (y == null) {
return <span></span>;
}
if (y.DateTime) {
moment2 = moment(y.value);
var moment2 = moment(y.value);
if (moment2.isValid) {
return <span>{moment2.format(this.props.dateTimeFormat)}</span>;
}
Expand All @@ -27,7 +26,7 @@ export default class CustomCell extends React.Component {
}
}
else if (y.startsWith && y.startsWith("/Date(")){
moment2 = moment(y.substr(6), 'x)/"');
var moment2 = moment(y.substr(6), 'x)/"');
if (moment2.isValid) {
return <span>{moment2.format(this.props.dateTimeFormat)}</span>;
}
Expand Down

0 comments on commit 37b9de3

Please sign in to comment.