Welcome Guest Search | Active Topics | Sign In | Register

Regarding DatePicker Value Options
Chalasani
Posted: Sunday, January 6, 2008 4:21:23 AM
Rank: Newbie
Groups: Member

Joined: 1/6/2008
Posts: 3

Dear Sir,

I downloaded and I am going through all the controls which you have given in the control suite.

All the controls are working fine. I am very much interested to purchase this product. I have a

problem while assigning date to DatePicker. I tried many events, but I am unable to assign the

date to it.

Please solve this as early as possible

With Regards
Krishna Chalasani
eo_support
Posted: Sunday, January 6, 2008 5:28:51 AM
Rank: Administration
Groups: Administration

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

Try to set the DatePicker's SelecteDate property to a DateTime value, for example:

DatePicker1.SelectedDate = DateTime.Now

Thanks
sunsethill
Posted: Sunday, January 6, 2008 11:34:06 AM
Rank: Member
Groups: Member

Joined: 10/15/2007
Posts: 8
Hi,

I am experiencing an issue with the datepicker as well.

When the form is set for editing, I set the selected date to today's date. This works OK.

However, if I select a different date, then attempt to retrieve the date using


Code: Visual Basic.NET
Dim dtDate As Date = Me.cboDateEdit.SelectedDate



or

Code: Visual Basic.NET
Dim strDate as string = Me.cboDateEdit.SelectedDateString


... the date returned is today's date - regardless of which date has been selected.
eo_support
Posted: Sunday, January 6, 2008 3:15:52 PM
Rank: Administration
Groups: Administration

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

Check whether you are always setting the DatePicker's SelectedDate or only set it in "If Not Page.IsPostBack" condition. "If Not Page.IsPostBack" is necessary because otherwise you are always overwritting whatever user has entered.

As a test, you can try the following steps:

1. Create a blank web form;
2. Place a DatePicker control and a Button control in the form;
3. Inside your Page_Load handler, put the following code:
Code: Visual Basic.NET
If Not Page.IsPostBack Then
    DatePicker1.SelecteDate = DateTime.Today
End If

4. Inside the button's event handler, check the DatePicker's SelecteDate or SelectedDateString, it should reflect whatever the user has entered, not today's date;

We tried the above steps and it appears to work fine.

Thanks
sunsethill
Posted: Monday, January 7, 2008 5:30:16 AM
Rank: Member
Groups: Member

Joined: 10/15/2007
Posts: 8
Try putting the date edit control and the button inside a callback panel. If both controls are inside the callback panel it doesn't recognize the new value selected by the user. I can send you a sample solution that illustrates this.
eo_support
Posted: Monday, January 7, 2008 12:15:08 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,091
sunsethill wrote:
Try putting the date edit control and the button inside a callback panel. If both controls are inside the callback panel it doesn't recognize the new value selected by the user. I can send you a sample solution that illustrates this.


Can you send us the sample solution? We tried to put both of them inside a CallbackPanel and it still works fine.

Thanks
steve g
Posted: Tuesday, January 22, 2008 3:06:53 PM
Rank: Newbie
Groups: Member

Joined: 1/22/2008
Posts: 1
I would like to use the datepicker to allow my users to pick dates but have the time preset to a particular hour, say 7:00 PM.
Is this possible, and if so, how do i do it?
Thanks in advance for any advice.
steve
eo_support
Posted: Tuesday, January 22, 2008 3:13:37 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,091
No. That is not possible. If you show the time part, user will be able to edit it. You probably need to put a lable next to the DatePicker to achieve that.


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.