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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DateTimeEdit Empty Date

Thread ID:





109918 Jul 10,2013 09:08 PM UTC Jul 18,2013 09:06 AM UTC WPF 3
Tags: Tools
Michel Cossette
Asked On July 10, 2013 09:08 PM UTC

Hi, I'm setting a DateTimeEdit with IsEmptyDateEnabled=True, I see the "none" button in the Calendar and it sets the DateTime to null. But I would also like to be able to hit the "delete" or "backspace" keys while the control's text is selected to nullify the its value. I noticed there's a property called "EnableBackspaceKey" and another one called "EnableDeleteKey" but setting any or both to "True" has no effect on the behavior of the control. Does anybody knows if its possible to nullify the control's DateTime value by using the keyboard?






Jegan Raj M [Syncfusion]
Replied On July 11, 2013 10:05 AM UTC

Hi Michel,

Thanks for your interest in Syncfusion Products.

We have created workaround sample based on your request which can be downloaded from the below link.
In this below sample, in 'PreviewKeyUp' event we are checking for the pressed key, nullify the date if 
the key is either 'Backspace' or 'Delete'

Please let us know if you have any queries.

Jegan Raj M


Michel Cossette
Replied On July 11, 2013 09:39 PM UTC

Hi Jegan Raj,

Thanks for the workaround, I had tried the PreviewKeyDown event but its not raised for some reason and I didn't think of trying the PreviewKeyDown event instead. Anyways,  I refactored your code into an Attached Behaviour which is set in the implicit style that targets DateTimeEdit, it is set to Enabled when the property IsEmptyDateEnabled is itself set to true via a style trigger. It works great. Nonetheless I think this behaviour should be wired in the control itself, in a future release perhaps!

Here's my code:



Jegan Raj M [Syncfusion]
Replied On July 18, 2013 09:06 AM UTC

Hi Michel,

Thanks for your update.

We have forwarded your suggestion to our development team.
By analyzing the property used and the code changes done we will make necessary changes in our further 

Please let us know if you have any queries.

Jegan Raj M


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon