Hello,
I am using currently mask editor control where I set the input mask as nn:nn and format string 00:00. The issue is when I put curser between two zeros of hours field and type say 09. It converts 09 to 90. See the little screenshot below.
I want them to be displayed as 09:00 instead 90:00.
Thanks,
Mayank
Hello Mayank,
I tried to reproduce your issue. When I have set UltraMaskEdit’s input mask as nn:nn and format string as 00:00 I was not able to click between front two zeroes if there is no input value. If I input 00:00 in UltraMaskEdit field I was able to click between front two zeroes. In this moment if I press any digit on the keyboard it appears to the right of the cursor, e.g. if I press 9 the field changes from 00:00 to 90:00 – exactly as you said. Please note this is normal behavior of UltraMaskEdit with nnnn mask. When you use nnnn mask it fills the digits you enter from right to left. If the place to the left of cursor is empty or zero and you enter a digit this digit takes the place to the right of cursor.
If you need to fill the place to the left of cursor you should use 99:99 mask. More about input mask properties you can find following next link http://help.infragistics.com/Help/Doc/WinForms/2011.2/CLR2.0/html/Infragistics2.Win.UltraWinMaskedEdit.v11.2~Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit~InputMask.html
One more point. Please note if you need to input hours and minutes in your input field you can use hh:mm mask.
Please let me know if this is what you are looking for or if I am missing something.
Can you give me one small example with MaskInput 99:99?
I appreciate your help.
In order to be able to override the values in UltraMaskEdit control you need to set InsertMode to false. This property determines editing mode (insert or overstrike) of the control.
http://help.infragistics.com/doc/WinForms/2014.1/CLR4.0/?page=Infragistics4.Win.UltraWinMaskedEdit.v14.1~Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit~InsertMode.html
Please find attached a sample solution with UltraMaskEdit control with Text set to “00:00”, InputMask set to “99:99” and FormatString set to “00:00”. In sample solution I also have set InsertMode to false.
Please check my sample solution and let me know if this is what you are looking for or if I am missing something.
This is what i needed.