ComponentOne DateTimeEditors for UWP
C1TimeEditor Help / C1TimeEditor Task-Based Help / Working with Time Spans
In This Topic
    Working with Time Spans
    In This Topic

    You can modify a C1TimeEditor control so that it will display a time span. In this tutorial, you will create a C1TimeEditor control that represents a time span between 5:00 and 10:00. You will also write code for the project that sets the starting value to 7:00 a.m.

    Complete the following steps:

    1. Click the C1TimeEditor control once to select it.
    2. In the Properties window, complete the following steps:
    1. Set the Format property to TimeSpan.
    2. Set the C1TimeEditor.Maximum property to a value, such as "10:00:00".
    3. Set the C1TimeEditor.Minimum property to a value, such as "05:00:00".
    4. Set the C1TimeEditor.Value property to a value, such as "07:00:00".
    1. Run the project and observe that the control loads with a time of 07:00:00 a.m.
    2. Click the increase time button until you can go no further. It will stop at 10:00:00.
    3. Click the decrease time button until you can go no further. It will stop at 05:00:00.