We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

SfTimePicker value at codebehind

Please can you provide an example about how to set time value to SfTimePicker at codebehind?

Cheers

3 Replies

VR Vijayalakshmi Roopkumar Syncfusion Team August 3, 2017 06:08 AM UTC

Hi Josep

Thank you for contacting Syncfusion Support.

This reported requirement in SfTimePicker can be achieved by using its property named Value. Please make use of below code example for your reference.

Code Example: 
 
  
public MainWindow()   
{   
   InitializeComponent();   
   //setting the Value to SfTimePicker in code behind.   
   TimePicker1.Value = new TimeSpan(10, 24, 05);   
}   
 

Screenshot: 

Please try this solution and let us know if it helps.

Regards
Vijayalakshmi V.R.  



JO Josep replied to Josep August 3, 2017 06:15 AM UTC

Please can you provide an example about how to set time value to SfTimePicker at codebehind?

Cheers

Cheers. It works



VR Vijayalakshmi Roopkumar Syncfusion Team August 4, 2017 04:49 AM UTC

Hi Joseph

Thank you for the update.

Please let us know if you need any further assistance on this

Regards,
Vijayalakshmi V.R.

Loader.
Live Chat Icon For mobile
Up arrow icon