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

SelectedDateTimeChanged event issue

1 Answer 23 Views
TimePicker
This is a migrated thread and some comments may be shown as answers.
shay keren
Top achievements
Rank 1
shay keren asked on 29 Dec 2009, 11:15 AM
hi
i would like to rollback the datetime user selection under the 'SelectedStartDateTimeChanged' event.
it seems that the SelectedDateTime property is updated correctly but the time control (view) is not.

scenario
the current dateTime selection is  29/12/2009 14:00
user try to change the datetime to  29/12/2009 15:00
then i would like from the time control to show 14:00 and not 15:00

source code:
 private void OnSelectedStartDateTimeChanged(object sender, RoutedPropertyChangedEventArgs<DateTime?> e)
        {
            try
            {
                UnSubscribeToSelectedStartDateTimeChanged();
                if (e.OldValue == null) //first time loading
                    return;

                 startDateTime.SelectedDateTime = (DateTime) e.OldValue;
              
            }
            finally
            {
                SubscribeToSelectedStartDateTimeChanged();
            }
        }

1 Answer, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 30 Dec 2009, 08:21 AM
Hi shay keren,

Can you specify the exact type of control you are using as the RadTimePicker is not exposing such property as SelectedDateTime and 'SelectedStartDateTimeChanged' event.

Greetings,
Kaloyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TimePicker
Asked by
shay keren
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Share this question
or