This question is locked. New answers and comments are not allowed.
Say my mask is Mask="#2.2" , On a Mac OS when I type .5 I get 5.00 instead of 0.5
0.5 works but not .5
I figured out this is because it's a PlatformKeyCode of 47 on mac vs 110 or 190 on a PC.
To fix this I added this which works:
0.5 works but not .5
I figured out this is because it's a PlatformKeyCode of 47 on mac vs 110 or 190 on a PC.
To fix this I added this which works:
public mainPage(){
...
textBoxHours.AddHandler(RadMaskedNumericInput.KeyDownEvent, new KeyEventHandler(mask_KeyDown), true);
}
private
void
mask_KeyDown(
object
sender, KeyEventArgs e)
{
if
((e.Key == Key.Decimal) || (e.PlatformKeyCode == 190) || (e.PlatformKeyCode == 110) || (e.PlatformKeyCode == 47))
{
//47 is for mac
RadMaskedNumericInput numericInput = sender
as
RadMaskedNumericInput;
double
value = numericInput.Value ?? 0.0;
if
(value == 0)
{
numericInput.Value = 0;
numericInput.SelectionStart = 3;
}
}
}