File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
classes/Visualizer/Module Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ public function __construct( Visualizer_Plugin $plugin ) {
54
54
parent ::__construct ( $ plugin );
55
55
56
56
$ this ->_addAction ( 'wp_enqueue_scripts ' , 'enqueueScripts ' );
57
+ $ this ->_addAction ( 'load-index.php ' , 'enqueueScripts ' );
57
58
$ this ->_addAction ( 'visualizer_enqueue_scripts ' , 'enqueueScripts ' );
58
59
$ this ->_addFilter ( 'visualizer_get_language ' , 'getLanguage ' );
59
60
$ this ->_addShortcode ( 'visualizer ' , 'renderChart ' );
Original file line number Diff line number Diff line change @@ -265,11 +265,15 @@ var __visualizer_chart_images = [];
265
265
case 'date' :
266
266
// fall-through.
267
267
case 'datetime' :
268
- var dateParse = Date . parse ( data [ i ] [ j ] . replace ( / - / g, '/' ) ) ;
269
- if ( isNaN ( dateParse ) ) {
270
- dateParse = Date . parse ( data [ i ] [ j ] ) ;
268
+ if ( typeof data [ i ] [ j ] === 'string' ) {
269
+ var dateParse = Date . parse ( data [ i ] [ j ] . replace ( / - / g, '/' ) ) ;
270
+ if ( isNaN ( dateParse ) ) {
271
+ dateParse = Date . parse ( data [ i ] [ j ] ) ;
272
+ }
273
+ date = new Date ( dateParse ) ;
274
+ } else if ( typeof data [ i ] [ j ] === 'object' ) {
275
+ date = data [ i ] [ j ] ;
271
276
}
272
- date = new Date ( dateParse ) ;
273
277
data [ i ] [ j ] = null ;
274
278
if ( Object . prototype . toString . call ( date ) === "[object Date]" ) {
275
279
if ( ! isNaN ( date . getTime ( ) ) ) {
You can’t perform that action at this time.
0 commit comments