Formatting the SpinGadget
Posted: Fri Sep 22, 2017 10:06 am
If displaying a year like 1963 in a SpinGadget it is formatted by default as 1.963 using a point as thousand separator what is not so nice for a year number.
The display of a SpinGadget can be formatted as follows by manipulating the "constraints" attributes:
Best regards. Markus
The display of a SpinGadget can be formatted as follows by manipulating the "constraints" attributes:
Code: Select all
SpinGadget(#SpinGadgetYear, 70, 70, 100, 24, 1900, 9999, #PB_Spin_Numeric)
SpinGadgetId = GadgetID(#SpinGadgetYear)
! dijit.byId(v_spingadgetid.gadget.id).attr('constraints').places = 0;
! dijit.byId(v_spingadgetid.gadget.id).attr('constraints').pattern = '#';
; For values of "places" and "pattern" see at:
; https://dojotoolkit.org/reference-guide/1.7/quickstart/numbersDates.html