How do I always display two digits in the ignumeric editor? In my case, I'm displaying hours, minutes, seconds in ignumeric editors. Those values should display a leading zero.
Hi Julie,
Thank you for participating in Infragistics community.
If you only need to display time information I would suggest you to use the ‘igDateEditor’ control. To achieve the desired behavior you could set option ‘dateInputFormat’ to "hh:mm:ss".
We have a sample of ‘igDateEditor’ here:
http://www.igniteui.com/editors/date-editor
Also you could find ‘igDateEditor’ documentation here:
http://www.igniteui.com/help/igdateeditor-overview
best regards,
Borislav Kulov
Senior Software Developer
Infragistics, Inc.
The date editor does not satisfy my need. I initially used that with the spinner, however, it takes 3 clicks to increment the seconds (one click on the control, which selects all, another click on the seconds, and a third click on the spinner up arrow). That is not user-friendly. The numeric editor would require only one click to increment the seconds value.
‘IgNumericEditor’ is designed to display a single number formatted in a special way (using decimal and group separators).
However, ‘igDataEditor’ is designed to display several different numbers grouped together. In this case we have 3 different numbers – hour, minutes and seconds. Spinner could be used to increment any of that numbers. This is how the spinner works in different scenarios:
- If the editor doesn’t have focus and there is a day number present – spinner increments the day;
- If the editor doesn’t have focus and there is NO day number present – spinner increments the smallest number, in this case the seconds;
- If the editor has focus – this spinner increments the number where cursor is located. This is the case you described in your reply.
I’ve prepared a Fiddle where you could test those behaviors (see ‘Around’ editor):
http://jsfiddle.net/h5n0wgbt/
Take a look at the provided sample and let me know whether it works for you. If you need further assistance, please provide more details: Ignite UI version, browser used, code sample, so we can investigate your case and provide you a better support.