Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default value for DateTimePicker

Status
Not open for further replies.

rangerstud620

Programmer
Sep 17, 2003
34
0
0
US
If using the DateTimePicker, is there a way to change the date back to the current default date once the date has been changed? Right now, if i change the date, I can't return to the current date unless I change it manually. Any ideas? I would like to be able to return to the current default date by using a button. Thanks!!
 
Just set the value property of the DTPicker to the value you need.

Code:
DateTimePicker1.Value = Date

Take Care,

zemp

"Show me someone with both feet on the ground and I will show you someone who can't put their pants on."
 
zemp, I wish it was that easy:). The value needs to be the current date, so I can't set the value equal to a constant. Thanks
 
'Date' is a build it VB function that returns todays date, or the current date.

Take Care,

zemp

"Show me someone with both feet on the ground and I will show you someone who can't put their pants on."
 
Ah I forgot all about that function. Wow, talk about making things harder than they are :) Thanks again zemp!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top