Browse Source

Fix for IE date issue with prettyDate format for single and double digit years closes #131

pull/141/head
Zach Wise 13 years ago
parent
commit
3130b59dac
  1. 8
      compiled/js/timeline-min.js
  2. 8
      compiled/js/timeline.js
  3. 7
      source/js/Core/VMM.Date.js
  4. 1
      source/js/VMM.Timeline.DataObj.js

8
compiled/js/timeline-min.js vendored

File diff suppressed because one or more lines are too long

8
compiled/js/timeline.js

@ -1387,10 +1387,11 @@ if(typeof VMM != 'undefined' && typeof VMM.Date == 'undefined') {
}
// Passing date through Date applies Date.parse, if necessary
date = date ? new Date(date) : new Date;
// Caused problems in IE
// date = date ? new Date(date) : new Date;
if (isNaN(date)) {
trace("invalid date");
return "";
trace("invalid date " + date);
//return "";
}
mask = String(dF.masks[mask] || mask || dF.masks["default"]);
@ -8113,6 +8114,7 @@ if(typeof VMM.Timeline != 'undefined' && typeof VMM.Timeline.DataObj == 'undefin
},
parseJSON: function(d) {
trace(d);
if (d.timeline.type == "default") {
trace("DATA SOURCE: JSON STANDARD TIMELINE");
VMM.fireEvent(global, VMM.Timeline.Config.events.data_ready, d);

7
source/js/Core/VMM.Date.js

@ -253,10 +253,11 @@ if(typeof VMM != 'undefined' && typeof VMM.Date == 'undefined') {
}
// Passing date through Date applies Date.parse, if necessary
date = date ? new Date(date) : new Date;
// Caused problems in IE
// date = date ? new Date(date) : new Date;
if (isNaN(date)) {
trace("invalid date");
return "";
trace("invalid date " + date);
//return "";
}
mask = String(dF.masks[mask] || mask || dF.masks["default"]);

1
source/js/VMM.Timeline.DataObj.js

@ -141,6 +141,7 @@ if(typeof VMM.Timeline != 'undefined' && typeof VMM.Timeline.DataObj == 'undefin
},
parseJSON: function(d) {
trace(d);
if (d.timeline.type == "default") {
trace("DATA SOURCE: JSON STANDARD TIMELINE");
VMM.fireEvent(global, VMM.Timeline.Config.events.data_ready, d);

Loading…
Cancel
Save