diff --git a/src/view.flot.js b/src/view.flot.js index 5059156e..43d997a7 100644 --- a/src/view.flot.js +++ b/src/view.flot.js @@ -316,7 +316,8 @@ my.Flot = Backbone.View.extend({ var x = doc.getFieldValue(xfield); if (isDateTime) { - var _date = moment(x); + // cast to string as Date(1990) produces 1970 date but Date('1990') produces 1/1/1990 + var _date = moment(String(x)); if (_date.isValid()) { x = _date.toDate().getTime(); }