Permalink
Browse files

fetch e before using it

  • Loading branch information...
1 parent 8579f2f commit 6df3ddc856a6b6ef22978499a50416213c1e51ff @bradrobertson bradrobertson committed Oct 30, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/dateinput/dateinput.js
@@ -282,13 +282,14 @@
currMonth = date.getMonth();
currDay = date.getDate();
+ e || (e = $.Event("api"));
+
// focus the input after selection (doesn't work in IE)
if (e.type == "click" && !$.browser.msie) {
input.focus();
}
// beforeChange
- e = e || $.Event("api");
e.type = "beforeChange";
fire.trigger(e, [date]);
@@ -420,7 +421,7 @@
// month selector
monthSelector.unbind("change").change(function() {
- self.setValue(yearSelector.val(), $(this).val());
+ self.setValue(yearSelector.val(), $(this).val());
});
// year selector

0 comments on commit 6df3ddc

Please sign in to comment.