I found that I need to make the following changes:
In the CalendarCell constructor, change the format to 24 hours.
public CalendarCell()
: base()
{
this.Style.Format = "HH:mm";
}
. ShowUpDown true, :
public CalendarEditingControl()
{
this.Format = DateTimePickerFormat.Custom;
this.CustomFormat = "HH:mm";
this.ShowUpDown = true;
}
EditingControlFormattedValue. , -, , , , .
public object EditingControlFormattedValue
{
get
{
return this.Value.ToString("HH:mm");
}
set
{
if (value is String)
{
try
{
this.Value = DateTime.Parse((String)value);
}
catch
{
this.Value = DateTime.Now;
}
}
}
}