I'm trying to load two day.js
plugins on the client-side. But it doesn't seem to be working... what am I doing wrong?
Pug / Jade
file
script(defer, src='javascript/external/day.js')
script(defer, src='javascript/external/day_minmax.js')
script(defer, src='javascript/external/day_isbetween.js')
script(defer, dayjs.extend(window.dayjs_plugin_minmax))
script(defer, dayjs.extend(window.dayjs_plugin_isbetween))
console
output
dayjs.max()
Uncaught TypeError: dayjs.max is not a function
The loaded js
plugin files are from:
Here is a working example inside a index.html file, you could do the same inside your root Pug/Jade file. Also i'm using cdn version, but you could also import them from your folder where you downloaded them.
window.dayjs_plugin_minmax
vswindow.dayjs_plugin_minMax
might the problemAnd this is the result: