Permalink
Browse files

fix dateinput selectors

  • Loading branch information...
bradrobertson committed Oct 30, 2011
1 parent 6df3ddc commit 8059b6dddddd58d6e7a34c831968b3f4b3aabc8b
Showing with 10 additions and 10 deletions.
  1. +10 −10 src/dateinput/dateinput.js
View
@@ -419,16 +419,16 @@
opened = true;
- // month selector
- monthSelector.unbind("change").change(function() {
- self.setValue(yearSelector.val(), $(this).val());
- });
-
- // year selector
- yearSelector.unbind("change").change(function() {
- self.setValue($(this).val(), monthSelector.val());
- });
-
+ // month selector
+ monthSelector.unbind("change").change(function() {
+ self.setValue(integer(yearSelector.val()), integer($(this).val()));
+ });
+
+ // year selector
+ yearSelector.unbind("change").change(function() {
+ self.setValue(integer($(this).val()), integer(monthSelector.val()));
+ });
+
// prev / next month
pm = root.find("#" + css.prev).unbind("click").click(function(e) {
if (!pm.hasClass(css.disabled)) {

0 comments on commit 8059b6d

Please sign in to comment.