Appendix D. Creating decimal, currency, and time pickers with Globalize

In chapter 3 we discussed how to use the jQuery UI spinner widget to transform <input> elements into basic number pickers. Here, we’ll look at more complex usage scenarios of the spinner widget, including how to create decimal, currency, and time pickers.

To make this possible, the spinner widget uses another jQuery project known as Globalize. Globalize is a library that handles the formatting and parsing of various data types—strings, dates, numbers, and the like—in numerous cultures around the world. The spinner widget integrates with Globalize’s formatting and parsing to make these complex widgets possible. Let’s look at how, starting with decimal pickers.

D.1. Building ...

Get jQuery UI in Action now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.