This is a migrated thread and some comments may be shown as answers.

RadDatePicker : how to reset a date inside text input?

7 Answers 781 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Hans van Rijnswoud
Top achievements
Rank 2
Hans van Rijnswoud asked on 12 May 2010, 11:18 AM
Hi,

I try on the server site to reset the selected date ( textbox need to be empty).

The definition of my RadDatePicker is :
<telerik:RadDatePicker ID="txt_DateFrom" runat="server" Culture="nl-NL" MinDate="2010-02-15" 
                                MaxDate="" ShowPopupOnFocus="true" /> 

I try to use this but whithout effect !

txt_DateFrom.DateInput.Text = string.empty;

I try to find a solution on the demo area, documentation and forum but nothing founded!

Can you me please help with this?

In advance thanks,

Regards,

Edwin.

7 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 12 May 2010, 11:40 AM
Hello Edwin,

I recommend you use the Clear method:
txt_DateFrom.Clear();

Best regards,
Daniel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Hans van Rijnswoud
Top achievements
Rank 2
answered on 12 May 2010, 12:06 PM
Hi Daniel,

Thank you for this very quick answer ;-)

Have a nice day.

Edwin.
0
Lubna Ansari
Top achievements
Rank 1
answered on 02 Aug 2010, 03:30 PM
Hi Daniel,

I'm adding a raddatepicker from codebehind which shows a default current date in date text box. I've tried to clear the date but it is not working. Below is my code.

RadDatePicker

 

datepicker = new RadDatePicker();

 

datepicker.DateInput.DateFormat = objdr[

"DateTimeFormat"].ToString();

 

datepicker.MinDate =

Convert.ToDateTime("01/01/1900");

 

datepicker.Clear();

AddControl(para, datepicker, div3, div1, divQuestion

);

Regards,
Lubna.

 

 
0
Daniel
Telerik team
answered on 05 Aug 2010, 02:59 PM
Hello Lubna,

Please download the attached project and let me know if I'm missing something because I failed to reproduce the problem.

Kind regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Lubna Ansari
Top achievements
Rank 1
answered on 06 Aug 2010, 03:48 PM
My bad... I was resetting the date later.
0
bdk0172
Top achievements
Rank 1
answered on 17 Aug 2010, 03:02 PM
Is there a server-side event that gets fired when I remove the text from the datepicker dateinput textbox? 

Say I have two datepicker controls to select a date range to retrieve records.
I select 8/10/2010 and 8/17/2010 and then click my retrieve button and it returns records.
I then delete the dates within the dateinput textboxex by clicking within them and hitting backspace within both datepickers until the textbox is blank.
When I do a retrieve now, the SelectedDate values are still 8/10/2010 and 8/17/2010 instead of null.

How can I call Clear() on the controls when the textboxes have been cleared?
0
bdk0172
Top achievements
Rank 1
answered on 17 Aug 2010, 03:59 PM
Please disregard my previous post, I was making the same mistake as Lubna.
Tags
Calendar
Asked by
Hans van Rijnswoud
Top achievements
Rank 2
Answers by
Daniel
Telerik team
Hans van Rijnswoud
Top achievements
Rank 2
Lubna Ansari
Top achievements
Rank 1
bdk0172
Top achievements
Rank 1
Share this question
or