diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index 941aa757d5..7aee68f350 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -1350,7 +1350,7 @@ celerity_register_resource_map(array( ), 'javelin-behavior-fancy-datepicker' => array( - 'uri' => '/res/ae843244/rsrc/js/application/core/behavior-fancy-datepicker.js', + 'uri' => '/res/0a1bc610/rsrc/js/application/core/behavior-fancy-datepicker.js', 'type' => 'js', 'requires' => array( diff --git a/webroot/rsrc/js/application/core/behavior-fancy-datepicker.js b/webroot/rsrc/js/application/core/behavior-fancy-datepicker.js index 2eb1eb90fe..7dab7e2c88 100644 --- a/webroot/rsrc/js/application/core/behavior-fancy-datepicker.js +++ b/webroot/rsrc/js/application/core/behavior-fancy-datepicker.js @@ -80,9 +80,9 @@ JX.behavior('fancy-datepicker', function(config) { var read_date = function() { var i = get_inputs(); - value_y = i.y.value; - value_m = i.m.value; - value_d = i.d.value; + value_y = +i.y.value; + value_m = +i.m.value; + value_d = +i.d.value; }; var write_date = function() { @@ -216,16 +216,14 @@ JX.behavior('fancy-datepicker', function(config) { switch (p[0]) { case 'm': // User clicked left or right month selection buttons. - value_m = value_m - 1; value_m = value_m + parseInt(p[1]); - if (value_m >= 12) { + if (value_m > 12) { value_m -= 12; - value_y += 1; - } else if (value_m < 0) { + value_y++; + } else if (value_m <= 0) { value_m += 12; - value_y -= 1; + value_y--; } - value_m = value_m + 1; break; case 'd': // User clicked a day.