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

TimePicker Selection on DropDown Causing Lost Focus?

3 Answers 109 Views
TimePicker
This is a migrated thread and some comments may be shown as answers.
Larry
Top achievements
Rank 1
Larry asked on 15 May 2014, 02:38 PM
Hi,

I used a TimePicker in RadGridView as editor control,

var culture = new CultureInfo("en-US") {DateTimeFormat = {ShortTimePattern = "HH:mm"}};
BindingTarget = RadDateTimePicker.SelectedTimeProperty;
return new RadDateTimePicker { SelectedTime = (TimeSpan)viewItemHolder[feature], InputMode = InputMode.TimePicker, TimeInterval = TimeSpan.FromMinutes(15), Culture = culture };

It seems if I select an item in its dropdown list via mouse clicking, it will lost focus and cause the editing row to commit immediately. If I select the item using keyboard (hitting enter), the TimePicker seems stay in focus.

I didn't notice this problem with RadDatePicker or RadDateTimePicker . Any idea what might go wrong here?

3 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 20 May 2014, 08:55 AM
Hi Larry,

I test the described scenario with the latest release version and the explained behavior is not present there. So I assume you are using an older version and my suggestion would be to test the same scenario with the newest one and let me know if this helps.

Hope this will work for you. If you still observe the same behavior using the newest version I'll ask you to share some more details about the exact scenario.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Santhosh
Top achievements
Rank 1
answered on 09 Jul 2014, 11:05 AM
Hello Kalin,

I am using RadTimePicker from version Q2 2014 and I am still getting this issue.

When I select a time say 6:15 and then I edit to change it to 6:18 and then Click on a Button, the Time value is not bound to the property AtTime in ViewModel.

XAML :
<telerik:RadTimePicker x:Uid="uxAtTimePicker" x:Name="uxAtTimePicker" Width="203" VerticalAlignment="Center" SelectedTime="{Binding AtTime, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">

ViewModel:

public TimeSpan? AtTime
{
get
{
return theAtTime;
}
set
{
theAtTime = value;
base.OnPropertyChanged("AtTime");
}
}

Best Regards,
Santhosh B
0
Kalin
Telerik team
answered on 10 Jul 2014, 12:12 PM
Hi Santhosh,

We aware of the explained issue and have it already logged in our Feedback portal. You can easily track its status on the following link:
http://feedback.telerik.com/Project/143/Feedback/Details/133215-selectedtime-property-of-timepicker-is-not-updated-correctly-when-manually-changi

However currently as a work around you can use RadDateTimePicker with InputMode TimePicker instead. You would need to bind the SelectedValue property to a DateTime? property in the ViewModel and will have to extract the Time from the SelectedValue in order to get the correct SelectedTime.

I apologize for any inconvenience caused. If you have any other questions let us know.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
TimePicker
Asked by
Larry
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Santhosh
Top achievements
Rank 1
Share this question
or