|
Rank: Advanced Member Groups: Member
Joined: 2/1/2008 Posts: 35
|
Hi,
Is there a way to automatically set the date to default to todays date in the picker box on new records. At present it displays two diagonal bars but no date. The calendar shows the current date at the bottom.
Regards.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You would do it by code:
DatePicker1.SelectedDate = DateTime.Today
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 2/1/2008 Posts: 35
|
Hi,
Could you expand on that a little, I am using VB. I want the option to be able to alter the date but require it to populate on open in new records with todays date.
Regards.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
What you need to do is write some code (as provided). It's not a single "option" that you can just set it. You need to write code to change the DatePicker's SelectedDate property to today's date. The sample code we provided is in VB. Basically we provide you the mean to set the value of the DatePicker to whatever you want it to be, but you are the one that decides when and where to set it because it needs to fit your application logic.
Thanks
|
|