Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with yearChanged #237

Open
thaqiftaher opened this issue Nov 13, 2018 · 0 comments
Open

Issues with yearChanged #237

thaqiftaher opened this issue Nov 13, 2018 · 0 comments

Comments

@thaqiftaher
Copy link

Hi there,

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)

Is there any way to achieve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant