Date Time Picker

M

Marcus Lloyd

Hi,

I'm using the Date Time Picker (SP4) V6

I would like to set the date/time to Now()

dtpDelDate.Value = Now()

When I set the value property I get the error 'Value is readonly'. The
control allows me to set a date at design.

Homw do I set the current date to the DateTime Picker control?
 
N

Nikos Yannacopoulos

Marcus,

Any chance you are trying to assign the value in the form's Open event?
I had the same problem and found it is too early, apparently the event
fires before the the DTPicker control has had the time to load. I solved
it by setting the value in the Load event which fires after the Open
event, and - I guess - after the DTPicker control has loaded.

HTH,
Nikos
 

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