Date.js getWeek () stops working after implementing Extjs

I had an existing site that used the date.js library, and it stopped working after I applied the Extjs border layout ( http://dev.sencha.com/deploy/dev/examples/layout-browser/layout-browser .html ) to my site.

So, the line in question is this:

var weeknum = (dates[y][m][d]).getWeek(); 

Firebug tells me that dates [y] [m] [d] .getWeek are not a function.

Now, from my understanding, Extjs extends the javascript date object, which is the likely cause for this problem. I tried changing the line of code above to use Extjs getWeekOfYear (), but I still get the same error.

Any ideas on how I can save the existing getWeek () code and still use Extjs?

Thanks!

EDIT: Was there

 console.log((dates[y][m][d])); 

Firefox console

Edit2: Showing Ext.isDate, not a function, and function?

+4
source share
1 answer

I ended up deleting all my links to the Date.js file on any page that we had. Ext. It was not as difficult as I thought. Not perfect, but at least it works now.

0
source

Source: https://habr.com/ru/post/1347972/


All Articles