Datepicker blank text required

S

stainless

I have a date selection field that can be blank OR set to a valid
future date.

I am thinking of using a datepicker field but have one issue with
this.

If I have a check box in the datepicker that can be unticked to
represent no date selected, whatever is the default or last date
selected previously is still displayed in the text display field for
the datepicker, albeit in grayed out format.

The issue I have with this is that our customers will get confused by
this as many will still believe that the date they can see is still
the selected date (and not an empty date field).

Is it possible to change the text colour in this field to white or
transparent, so it looks empty, when the checkbox is unticked, and
vice versa?

I am using an older version of .Net framework (Version 1.1.4322 SP1).
I did find some help regarding a property of ForeColor but this does
not appear to be available as a DatePicker property when I try to code
it.

Cheers

Mark
 
M

Michael Nemtsev [MVP]

Hello stainless,

AFAIK it's behaviour by design.

the best way it to use the custom datepicked to remove that behaviour.
u can find some samples on codeproject.com

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


s> I have a date selection field that can be blank OR set to a valid
s> future date.
s>
s> I am thinking of using a datepicker field but have one issue with
s> this.
s>
s> If I have a check box in the datepicker that can be unticked to
s> represent no date selected, whatever is the default or last date
s> selected previously is still displayed in the text display field for
s> the datepicker, albeit in grayed out format.
s>
s> The issue I have with this is that our customers will get confused by
s> this as many will still believe that the date they can see is still
s> the selected date (and not an empty date field).
s>
s> Is it possible to change the text colour in this field to white or
s> transparent, so it looks empty, when the checkbox is unticked, and
s> vice versa?
s>
s> I am using an older version of .Net framework (Version 1.1.4322 SP1).
s> I did find some help regarding a property of ForeColor but this does
s> not appear to be available as a DatePicker property when I try to
s> code it.
s>
s> Cheers
s>
s> Mark
s>
 
C

Chris Dunaway

I have a date selection field that can be blank OR set to a valid
future date.

I am thinking of using a datepicker field but have one issue with
this.

If I have a check box in the datepicker that can be unticked to
represent no date selected, whatever is the default or last date
selected previously is still displayed in the text display field for
the datepicker, albeit in grayed out format.

The issue I have with this is that our customers will get confused by
this as many will still believe that the date they can see is still
the selected date (and not an empty date field).

Is it possible to change the text colour in this field to white or
transparent, so it looks empty, when the checkbox is unticked, and
vice versa?

I am using an older version of .Net framework (Version 1.1.4322 SP1).
I did find some help regarding a property of ForeColor but this does
not appear to be available as a DatePicker property when I try to code
it.

Cheers

Mark

You can set the CustomFormat property to something like this: "' '" to
display a single space.

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top