我们能否在后面的代码中设置Telerik rad时间选择器的最短时间

时间:2019-05-22 13:50:15

标签: vb.net telerik

我有一个telerik RadTimePicker,我们可以从后面的代码中设置最小的开始时间和结束时间。现在,我使用它来显示从6 AM到9PM。

1 个答案:

答案 0 :(得分:0)

这可以通过控件的RadTimePicker1.TimeView.StartTime和RadTimePicker1.TimeView.EndTime属性完成:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
    If Not IsPostBack Then
        RadTimePicker1.TimeView.StartTime = New TimeSpan(8, 0, 0)
        RadTimePicker1.TimeView.EndTime = New TimeSpan(18, 0, 0)
        RadTimePicker1.TimeView.Interval = New TimeSpan(0, 15, 0)
        RadTimePicker1.TimeView.HeaderText = ""
        RadTimePicker1.TimeView.Columns = 4
    End If
End Sub