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

UI not updated

4 Answers 78 Views
TimePicker
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 13 Apr 2011, 09:47 AM
Hi,

I have a RadTimePicker with its SelectedTime property bound to a view-model TimeSpan? property that looks like this:

public TimeSpan? Time
{
    get { return time; }
    set
    {
        if (value != null)
        {
             time = value;
        }
        NotifyPropertyChanged(...);
    }
}

So I'd like that when the user clears the input for the time picker the application actually restores the last value automatically. This should normally happen, since in the property setter I check for null and don't save the value, then raise the property changed event.

However, the input of the time picker stays blank! Can you tell me what I'm doing wrong here? The same approach works fine for a regular SL control (e.g. TextBox).

Thanks!

4 Answers, 1 is accepted

Sort by
0
Ken
Top achievements
Rank 1
answered on 14 Apr 2011, 08:39 AM
Interestingly enough, if I bind to the SelectedValue property, which is of type DateTime?, then it works as expected. So I guess there is a bug with SelectedTime?

Telerik, anyone?
0
Miroslav Nedyalkov
Telerik team
answered on 18 Apr 2011, 02:05 PM
Hello Adrian,

I would recommend you to use the SelectedValue property as it is the property designed to be bound with ViewModels. The SelectedTime property is exposed to be bound in the ControlTemplate of the DateTimePicker control to the Clock template part.
Though we will investigate the problem with the SelectedTime property as it is supposed to work correctly as well.

Regards,

Miroslav Nedyalkov
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
Ken
Top achievements
Rank 1
answered on 21 Apr 2011, 05:50 AM
Hello Miroslav,

This is what I'm currently using. Would be nice to know if the problem with SelectedTime is identified and fixed though.

Thanks,
Adrian
0
Miroslav Nedyalkov
Telerik team
answered on 26 Apr 2011, 03:24 PM
Hello Adrian,

We've logged the issue in PITS. You can track its progress using its PITS ID: 5711.

Kind regards,
Miroslav Nedyalkov
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
Tags
TimePicker
Asked by
Ken
Top achievements
Rank 1
Answers by
Ken
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Share this question
or