Days expressed in Hours in TimeSpanPicker

2 posts, 0 answers
  1. Dan
    Dan avatar
    1 posts
    Member since:
    Oct 2012

    Posted 27 Feb Link to this post

    My program needs to display a TimeSpan with days expressed in hours. For example,take the following TimeSpan:

    var someTimeSpan = TimeSpan.FromHours(50);

    The RadTimeSpanPicker displays the value and allows it to be edited in this format:

    2.2:00:00

    However, I need it to display the value and allow it to be edited in this format:

    50:00:00

    I grant that the way this is done out of the box is the way most would want it, and that I am asking for something special.

  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 01 Mar Link to this post

    Hi Daniel,

    You could create a custom TimeSpanComponent and calculate the value in order to achieve the needed format. Please check the following topic for more details on custom TimeSpanComponents:
    http://docs.telerik.com/devtools/wpf/controls/radtimespanpicker/timespancomponents#custom-timespancomponent

    Hope this will be helpful.

    Regards,
    Yana
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top