user2538170
user2538170

Reputation: 67

Disable date other than the current date with DevExpress DateEdit

How to disable a date other than the current date in c# devexpress dateedit

In the load event:

dtDate.MinDate = DateTime.Now;

On view:

<dx:ASPxDateEdit ID="dtDate" runat="server" EditFormatString="d MMM yyyy"></dx:ASPxDateEdit>

But it does not work, what is wrong or missing?

Upvotes: 2

Views: 2229

Answers (1)

Alaa Mohammed
Alaa Mohammed

Reputation: 392

set the DateEdit.DateTime value in the DateEdit.KeyPress event, and then set KeyPressEventArgs.Handled to be true

thanks

Upvotes: 1

Related Questions