Empty text on default object value

Hi,

I'm trying to set up that the SfMaskedEdit set a empty value (or only literals) when the binding of the control is the default value.

In my case the SfMaskedEdit.Text is binding to a DateTime property. I would like that when the value of the property is the default value (01/01/0001) the SfMaskedEdit only show the mask __/__/____. (the property is not a nullable DateTime).

Is that possible?

Also another question, what's the difference between the control SfMaskedEdit and the MaskedTextBox?

Thanks in advance.

3 Replies 1 reply marked as answer

UN Unknown Syncfusion Team August 4, 2020 11:32 AM UTC

Hi David, 

Thanks for contacting Syncfusion support. 

We have checked your query “Need to know whether we can display (--/--/----) when Value is binded to default date value(01/01/0001)” and currently there is no solution to meet your requirement. And for “the difference between the control SfMaskedEdit and the MaskedTextBox” query , both implies the same control, SfMaskedEdit is another name of MaskedTextBox. Please refer the below documentation for same. 


Regards, 
Niranjan Kumar Gopalan 


Marked as answer

DG David García August 4, 2020 10:03 PM UTC

Thanks for the reply.

About the SfMaskedEdit and the MaskedTextBox I ask because they have different properties when used in XAML.


UN Unknown Syncfusion Team August 5, 2020 10:20 AM UTC

Hi David, 

Thanks for your update. 

SfMaskedEdit is the successor of MaskedTextBox control. So there will be more advanced support and features available in SfMaskedEdit than available in MaskedTextBox. Please refer the below table for same. 

MaskedTextBox 
SfMaskedEdit 
Does not support regular expressions only support simple mask 
Support both simple and regular expressions. 
Does not support error border indication 
It supports error border indication  


Regards, 
Niranjan Kumar Gopalan 
 


Loader.
Up arrow icon