Welcome Guest Search | Active Topics | Sign In | Register

Picker Date default to current date Options
Colin
Posted: Monday, May 19, 2008 8:14:46 AM
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.
eo_support
Posted: Monday, May 19, 2008 9:39:46 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,090
Hi,

You would do it by code:

DatePicker1.SelectedDate = DateTime.Today

Thanks
Colin
Posted: Monday, May 19, 2008 11:16:18 AM
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.
eo_support
Posted: Tuesday, May 20, 2008 8:44:39 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,090
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



You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.