|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Try to set the DatePicker's SelecteDate property to a DateTime value, for example:
DatePicker1.SelectedDate = DateTime.Now
Thanks
|
|
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.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
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
|
|
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.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
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
|
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
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.
|
|