Hello, Ketan,
You can use the following workaround:
public class CustomTimpePicker : RadTimePicker
{
public override string ThemeClassName
{
get
{
return typeof(RadTimePicker).FullName;
}
}
protected override RadTimePickerElement CreateTimePickerElement()
{
return new CustomRadTimePickerElement();
}
}
public class CustomRadTimePickerElement : RadTimePickerElement
{
protected override Type ThemeEffectiveType
{
get
{
return typeof(RadTimePickerElement);
}
}
public override object Value
{
get
{
return base.Value;
}
set
{
if (value != null && value != DBNull.Value)
{
FieldInfo fi = typeof(RadTimePickerElement).GetField("editBox", BindingFlags.Instance | BindingFlags.NonPublic);
RadMaskedEditBoxElement editBox = (RadMaskedEditBoxElement)fi.GetValue(this);
PropertyInfo info = editBox.GetType().GetProperty("MaxDate", BindingFlags.Instance | BindingFlags.NonPublic);
info.SetValue(editBox, new DateTime(this.MaxValue.Year, this.MaxValue.Month, this.MaxValue.Day, this.MaxValue.Hour, this.MaxValue.Minute, this.MaxValue.Second), null);
}
}
}
}
Regards,
Nadya
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.