We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

RegEx pattern/mask for datetime format dd.MM.yy - HH:mm

Hello, 

I am trying to customize the masked textbox to have the user specify a date/time format in dd.MM.yy - HH:mm. Currently, I am using the following code: 

<syncfusion:SfMaskedEdit
Mask="^(0[1-9]|[12][0-9]|3[01])[.](0[1-9]|1[012])[.]\d\d - ([01][0-9]|2[0-3]):[0-5][0-9]$"
Watermark="DD.MM.YY - HH:MM"
PromptChar="_"
MaskType="RegEx"/>

Unfortunately, this does not allow any input at all. What am I doing wrong?


1 Reply

GT Gokul Thanudhas Syncfusion Team February 14, 2023 03:44 PM UTC

We suggest you to remove the '^' and '$' character from the Mask to achieve your requirement

Loader.
Up arrow icon