.. _dijit/form/CurrencyTextBox: dijit.form.CurrencyTextBox ========================== :Status: Draft :Version: 1.3 :Authors: Becky Gibson, Doug Hays, Bill Keese, Craig Riecke :Developers: Doug Hays, Bill Keese :Available: since V1.0 .. contents:: :depth: 2 CurrencyTextBox widgets inherit all the attributes and behaviors of the :ref:`NumberTextBox ` widget but are specialized for input monetary values, much like the currency type in spreadsheet programs. ===== Usage ===== * The ``value`` attribute is a native JavaScript floating point number. This means that you can easily build CurrencyTextBox widgets for a wide range of currencies without having to set a different value for each currency format. * The optional boolean ``fractional`` property of the ``constraints`` object attribute can be set to require/refuse fractional input. ======== Examples ======== Declarative example ------------------- In this example using USD, both dollars and cents are required. .. cv-compound:: .. cv:: javascript .. cv:: html Programmatic example -------------------- In this example using euros with German formatting, the invalid message contains a custom formatted example value. .. cv-compound:: .. cv:: javascript .. cv:: html EUR ============= Accessibility ============= See the Accessibility Section in :ref:`dijit.form.ValidationTextBox `