Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

VanillaStats change the start date

RexChienRexChien New
edited May 2019 in Vanilla 2.0 - 2.8

I want to change the default start date in my VanillaStats plugin but it seems not work

I found the value defined in the vanillastats.js of /plugins/VanillaStats/js/

if (range[key] === null) {
               // defaults
               if (key === 'to') {
                   // eod yesterday
                   range.to = moment().subtract(1, 'days').endOf('day').toDate();
               }
               if (key === 'from') {
                   // 1 year from eod yesterday
                   range.from = moment().subtract(1, 'days').subtract(1, 'years').endOf('day').toDate();
               }
           }


I tried to modify the default value to range.from = moment().set('days',27).set('month',4).set('year',2019).toDate();


But it is not work after my modification.

Did I miss any step after I modified it ?


Thanks

Sign In or Register to comment.