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

Disabling raddatepicker

4 Answers 123 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
jonathan
Top achievements
Rank 1
jonathan asked on 26 Sep 2008, 03:07 AM
Hi,

my goal is:
disable the text input so that users can't type anything in the date input.
and i want to have a white background on the date input

so far, i was able to disable the date input, but the text field is greyed.
MyDatePicker.DateInput.Enabled = false;

please help,
Regards,
Jonathan

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 Sep 2008, 05:16 AM
Hi Jonathan,

Try the following line of code to set the Disabled style for a RadDatePicker.

CS:
 RadDatePicker3.DateInput.DisabledStyle.BackColor = System.Drawing.Color.White; 
         


Thanks
Shinu.
0
jonathan
Top achievements
Rank 1
answered on 26 Sep 2008, 06:27 AM
it works perfectly.

thanks,
Jonathan
0
jonathan
Top achievements
Rank 1
answered on 26 Sep 2008, 12:20 PM
hi, i have a follow-up question, when using get_selectedDate()

the return is: Mon Sep 1 00:00:00 UTC+0800 2008

but i don't need any of the other information except the Month, Day and Year.

Regards,
Jonathan
0
Accepted
Shinu
Top achievements
Rank 2
answered on 29 Sep 2008, 10:28 AM
Hi Jonathan,

Try out the following JavaScript code to achieve the desired scenario.

JS:
  <script type="text/javascript" > 
    function OnDateSelected(sender, eventArgs) 
    { 
    var date = sender.get_selectedDate().toLocaleDateString(); 
    alert(date) 
    } 
 </script> 


Cheers
Shinu.
Tags
Calendar
Asked by
jonathan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
jonathan
Top achievements
Rank 1
Share this question
or