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

Date Picker & Time Picker - URGENT Solve Immediately

1 Answer 98 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Abdul Kadar
Top achievements
Rank 1
Abdul Kadar asked on 15 Oct 2008, 04:48 PM
Hi
In my application,I used Date Picker & time picker seperately.
I use the below code to avoid null values

If

 

  RadDatePicker1.IsEmpty Then
RadDatePicker1.SelectedDate = "01/01/2000"
End If

My problem is how to clear the data in raddatepicker1 when clicking new button
Also when I retrieve the data from the database, if the date in the database is "01/01/2000"
,I need the raddatepicker1 control data is empty.

 

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Oct 2008, 09:25 AM
Hello Abdul,

Try out the following code to clear the DatePicker on a button click.
protected void NewButton_Click(object sender, EventArgs e) 
    { 
        // Code to access the datepicker from its container control 
        RadDatePicker.Clear(); 
    } 

Also to clear the button when the DbSelectedDate is a particular date, ypu can use the following code.
 //code to access datepicker from its container control 
 if (RadDatePicker.DbSelectedDate.ToString() == "01/01/2000")  
    {  
       RadDatePicker.Clear();                  
    }  

Thanks
Princy.
Tags
Calendar
Asked by
Abdul Kadar
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or