vitalets / combodate

Dropdown date and time picker
http://vitalets.github.com/combodate
207 stars 82 forks source link

Call the change event when value is updated #9

Closed Philman closed 10 years ago

Philman commented 10 years ago

I think it would be great if you called the change event when the value is updated. That way people can register event handlers to your control.

Here are the changes I made (added change()):

Line 52:

            //update original input on change 
            this.$widget.on('change', 'select', $.proxy(function(){
                this.$element.val(this.getValue()).change();
            }, this));

Line 375:

this.$element.val(dt.format(this.options.format)).change();