Change editor date/time format

I can use FormatSettings.ShortDateFormat to change my default 12 hour clock to 24 hour when I display my date and times, but I can't find a way to change the editor so that the date/times are entered in 24 hour/military time format. I'm using edDateTimeEdit.

Can this be done?

You can use:


to control the format of the date part of this date/time picker inplace editor control.

I need to control the time part of the inplace editor control.

First, I need to set FormatSettings.ShortTimeFormat := 'hh:mm'; (not ShortDateFormat like I said before).

But even when setting

   grid.DateAndTimePicker.Format := 'MM/dd/yyyy hh:mm';

the inplace editor still shows AM or PM

The format of the time part of this date & time picker is controlled by:


Ah, okay, I'm getting close. I have in my OnCreate method:

   FormatSettings.ShortTimeFormat := 'hh:mm';

   sgd1.DateAndTimePicker.TimeFormat := 'hh:mm';

Now, when I enter "15" in the hour field and hit the enter key, it changes to "03" and moves to minutes. When I hit enter again to leave the cell it changes back to "15".

When I go back into the editor in the cell, the "15" changed back "03".

How do I get it to keep the "15" in the editor?

sgd1.DateAndTimePicker.TimeFormat := 'HH:mm';