See the Remarks section at
DateTimePicker Class (System.Windows.Forms)[
^].
[edit]
Set the properties according to the remarks in the link above to show a simple up down time control, and add the following code to the
ValueChanged
event handler:
DateTime dt = dateTimePicker1.Value;
int mins = dt.Minute;
if (mins == 1 || mins == 31)
{
dt = dt.AddMinutes(29);
dateTimePicker1.Value = dt;
}
That will increase the time by 30 minutes every time the up button is pressed. I leave you to add the code for the down button and the change of hour.