mdehoog / Semantic-UI-Calendar

Calendar module for Semantic UI
MIT License
805 stars 127 forks source link

How override onChange method #52

Closed antoniogiroz closed 7 years ago

antoniogiroz commented 7 years ago

Hi!

How can I override onChange method when calendar was initialized? For instance:

I set default calendar for all calendars on my site:

$('.ui.calendar').calendar({
    type: 'date',
    firstDayOfWeek: 1,
    //more properties...
  });

And then I would like override onChange method for every calendar input:

$('#birthDate').calendar.onChange = function(date, text) { //.... }

How can I do it?

Thanks!

antoniogiroz commented 7 years ago

I just find it!

$('#birthDate').calendar.settings.onChange = function(date, text) { //.... }
GuillaumeSTEIN commented 7 years ago

Hi, this doesn't work for me. I can set the new function, but it is never triggered