Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
150593 | Jan 13,2020 08:04 AM UTC | Jan 21,2020 03:30 PM UTC | WPF | 4 |
![]() |
Tags: TimeSpanEdit |
<syncfusion:TimeSpanEdit Grid.Row="0" Name="myTimeSpanEdit" Height="23" Width="180" Format="hh:mm:ss" Value="12:10:25" ValueChanged="myTimeSpanEdit_ValueChanged" > </syncfusion:TimeSpanEdit> |
private void myTimeSpanEdit_ValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e){if ((int)TimeSpan.Parse(e.NewValue.ToString()).TotalHours > 24){int hour = (int)TimeSpan.Parse(e.NewValue.ToString()).TotalHours % 24;(d as TimeSpanEdit).Value = new TimeSpan(hour, (d as TimeSpanEdit).Value.Value.Minutes, (d as TimeSpanEdit).Value.Value.Seconds);}} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.