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

Comparsion B/W <telerik:RadDateTimePicker>

1 Answer 22 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Joakim Linnarsson
Top achievements
Rank 1
Joakim Linnarsson asked on 23 Jun 2010, 07:42 AM
Sir ,
I have used two <telerik:RadDateTimePicker>.
In first <telerik:RadDateTimePicker> , I have set default value from codebehind as  Datetime.Now.
Now I am selecting Date from Second <telerik:RadDateTimePicker> , I want to compare Date as well as time with First <telerik:RadDateTimePicker>

When I select Date from Second <telerik:RadDateTimePicker>  , it takes 00.00 time. I dont want in this manner.
From DateControl ,only date should be selected & from TimeControl only time should be selected .

&
I want to separate Date & time in javascript.
See Attachement.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Jun 2010, 11:21 AM
Hi,

The following client code shows how to extract Date and Time from the SelectedDate property of RadDateTimePicker. I hope this will help you to get strated.

Client Code:
 
<script type="text/javascript"
    function getDateTime() { 
        var datePicker = $find("<%= RadDateTimePicker2.ClientID %>"); 
        alert("Date : " + datePicker.get_selectedDate().format('MM/dd/yyyy')); 
        alert(" Time : " + datePicker.get_selectedDate().format('HH:mm:ss')); 
    } 
</script> 

Here is the documentation which shows most important client side objects and methods of RadDateTimePicker.
Client-Side Basics
RadDateTimePicker Client Object

-Shinu.
Tags
Calendar
Asked by
Joakim Linnarsson
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or