From e3a6544ef318d82f2c6c9d2f0cd83960885da8df Mon Sep 17 00:00:00 2001 From: Christopher McCulloh Date: Fri, 21 Aug 2015 10:43:08 -0400 Subject: [PATCH] Makes spinner step option able to be set declaratively Allows for spinner step to be set inside of scheduler where you have no ability to directly influence the spinbox initialization settings. --- js/spinbox.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/spinbox.js b/js/spinbox.js index e22b7f6e1..5e40de931 100644 --- a/js/spinbox.js +++ b/js/spinbox.js @@ -38,6 +38,8 @@ e.preventDefault(); }); this.options = $.extend({}, $.fn.spinbox.defaults, options); + this.options.step = this.$element.data('step') || this.options.step; + this.$input = this.$element.find('.spinbox-input'); this.$element.on('focusin.fu.spinbox', this.$input, $.proxy(this.changeFlag, this)); this.$element.on('focusout.fu.spinbox', this.$input, $.proxy(this.change, this));