MaskedEdit cannot recognize binded value in iOS

Hi, 

We have trouble with SfMaskedEdit and cannot challenge anymore. 

There are two maskededit controls in our view and when the button to upsert the values is clicked, binded properties getting empty string in iOS emulator application. 
However, if we click again to the button, values are set at this second time.
We have another views which have this maskededit and the issue has the same consequence as well. 

When we execute Android device/emulator, we don't experience such an issue. 

Code snippets and screenshot handling maskededit enclosed as zip file...

Sf Version: 18.1.0.43 (17.x.x.x also didn't work)
Android version: 9.0 (emulator and device is working correctly, even with older versions) 
iOS version: 13.3 (emulator)



How I consume maskededit; 

                    <inputLayout:SfTextInputLayout
                        Grid.Row="7"
                        Hint="Doğum Tarihi"
                        Style="{StaticResource SfTextInputLayoutStyle}">
                        <maskededit:SfMaskedEdit
                            x:Name="meBirthDate"
                            Keyboard="Numeric"
                            Mask="00/00/0000"
                            MaskType="Text"
                            Style="{StaticResource SfMaskedEditStyle}"
                            ValueMaskFormat="ExcludePromptAndLiterals"
                            Value="{Binding BirthDateMasked, Mode=TwoWay}" />
                    </inputLayout:SfTextInputLayout>


                    <inputLayout:SfTextInputLayout
                        Grid.Row="4"
                        Hint="Cep Telefonu"
                        Style="{StaticResource SfTextInputLayoutStyle}">
                        <maskededit:SfMaskedEdit
                            x:Name="meMobile"
                            Keyboard="Numeric"
                            Mask="(000) 000-00-00"
                            MaskType="Text"
                            Style="{StaticResource SfMaskedEditStyle}"
                            Value="{Binding Mobile, Mode=TwoWay}" />
                    </inputLayout:SfTextInputLayout>


iOS AppDelegate.cs (neither Init nor new() is working)  

        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            // Initialization methods to launch Syncfusion controls in iOS
            //SfMaskedEditRenderer.Init();
            SfButtonRenderer.Init();
            SfGradientViewRenderer.Init();
            SfTextInputLayoutRenderer.Init();
            
            LoadApplication(new App());

            new SfMaskedEditRenderer();
            new SfNumericTextBoxRenderer();

            return base.FinishedLaunching(app, options);
        }

Attachment: Masked_Val_Issue_7133201b.zip

1 Reply

RS Ramya Soundar Rajan Syncfusion Team April 14, 2020 01:48 PM UTC

Hi Murat, 
 
Greetings from Syncfusion. 
 
We have analyzed your reported query with the provided code snippet, by default SfMaskedEdit default ValidationMode is LostFocus. In this mode, SfMaskedEdit’s Value updated while its focus gets lost. But, if we are pressing button in toolbar directly after entered the value in SfMaskedEdit, then its focus not get lost as per toolbar behavior in iOS which is the same for an Entry control also. So, only it shows null value.  
 
We would like to suggest that you can resolve this issue by changing the ValidationMode of SfmaskedEdit as KeyPress as like in below code.  
 
… 
 
            <maskededit:SfMaskedEdit 
                            x:Name="meBirthDate" 
                            Keyboard="Numeric" 
                            Mask="00/00/0000" 
                            MaskType="Text" ValidationMode="KeyPress" 
                            ValueMaskFormat="ExcludePromptAndLiterals" 
                            Value="{Binding BirthDateMasked, Mode=TwoWay}" /> 
 
… 
 
Please let us know, if you need any further assistance on this. 
 
Regards, 
Ramya S 


Loader.
Up arrow icon