[]
        
(Showing Draft Content)

Working with Time Spans

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:
    • Set the C1TimeEditor.Format property to TimeSpan.
    • Set the C1TimeEditor.Maximum property to a value, such as "10:00:00".
    • Set the C1TimeEditor.Minimum property to a value, such as "05:00:00".
    • Set the C1TimeEditor.Value property to a value, such as "07:00:00".
  3. Run the project and observe that the control loads with a time of 07:00:00 a.m.
  4. Click the increase time button until you can go no further. It will stop at 10:00:00.
  5. Click the decrease time button until you can go no further. It will stop at 05:00:00.