I wanted to store the year every time the yearChanged is fired. This is the my code:
yearChanged: function(e)
{
var tahun = $('#calendar').data('calendar').getYear();
alert(tahun);
},
However, the calendar is not displayed. When i opened the console, this is the error:
Uncaught TypeError: Cannot read property 'getYear' of undefined
at HTMLDivElement.yearChanged (conv-calendar.html:33)
at HTMLDivElement.dispatch (jquery-2.2.3.min.js:3)
at HTMLDivElement.r.handle (jquery-2.2.3.min.js:3)
at Object.trigger (jquery-2.2.3.min.js:4)
at HTMLDivElement.<anonymous> (jquery-2.2.3.min.js:4)
at Function.each (jquery-2.2.3.min.js:2)
at n.fn.init.each (jquery-2.2.3.min.js:2)
at n.fn.init.trigger (jquery-2.2.3.min.js:4)
at b._triggerEvent (bootstrap-year-calendar.min.js:7)
at b.setYear (bootstrap-year-calendar.min.js:7)
Hi there,
I wanted to store the year every time the yearChanged is fired. This is the my code:
However, the calendar is not displayed. When i opened the console, this is the error:
Is there any way to achieve this?