FlyingBlind
FlyingBlind

Reputation: 55

How do I set the deafult date within ASPxDateEdit only after the calendar has been expanded

My page has a DateEdit control than must be blank when the page initially displays. When the user expands to view the calendar, I want to set the default date to be something other than Today. But only within the calendar.

Upvotes: 2

Views: 4204

Answers (2)

Mikhail
Mikhail

Reputation: 9300

It is possible to implement the postponed date selection via the client-side functionality:

<dx:ASPxDateEdit ...>
    <ClientSideEvents DropDown="function(s, e) {
        if (!s.GetDate())
            s.SetDate(new Date());
    }" />
</dx:ASPxDateEdit>

Upvotes: 2

Jason
Jason

Reputation: 1226

I don't think this is possible. If the Date property is set, the date text will be displayed. And there doesn't seem to be an event which triggers before the calendar opens where you could set the Date property manually.

Upvotes: 0

Related Questions