I have used this js code in my laravel project for getting moment library.
var today = moment();
function Calendar(selector, events) {
this.el = document.querySelector(selector);
this.events = events;
this.current = moment().date(1);
this.draw();
var current = document.querySelector('.today');
if (current) {
var self = this;
window.setTimeout(function () {
self.openDay(current);
}, 500);
}
}
I have called the js file using this script tag inside body section
<script src="moment.min.js"></script>
Now getting Uncaught ReferenceError: moment is not defined in console. moment.min.js is in the same directory. How can I fix this.`