Im trying to use the jquery ui spinner for a minutes input. Currently it works 0 - 60 but I want the single digits to be 00,01..09 double digits.
According to the docs I should use globalize plugin and set numberFormat: 'mm' but that threw an error. In the console I looked at globalize js and 'mm' option is inside 'formatDate'. So I tried:
$('.minute-spinner').spinner({culture: "en-US",formatDate: "mm"});
but that didn't do anything. Anyone know how to make a spinner always show 2 digits?
The entire Globalize library is overkill if you just wish to employ numberFormat for JQuery spinner.
I omit Globalize and just add the following code somewhere in my js ...
Then add one of the following to your spinner cfg as per answer by Dom ...
Unfortunately,
.spinner()
does not have aformatDate
option.Try this:
DEMO: http://jsfiddle.net/dirtyd77/SA7Gk/
Hope this helps and let me know if you have any questions!
REFERENCES:
UPDATE:
Here is the reference to
globalize.js
.