Using edDateEdit in a grid to edit dates. I set the format to yyy-MM-dd, but on selecting a date the format in the cell changes to dd/MM/yyy. This does not happen with the Delphi DateTimePicker.
if ARow = FColDueDate thenbeginAEditor := edDateEdit;grdDetails.DateTimePicker.Format := 'yyy-MM-dd';if FUpdatedIssue.DueDate.trim <> '' thenbeginConvertDate(FUpdatedIssue.DueDate,lDate);grdDetails.DateTimePicker.Date := lDate;end;end
I tried formatting in the onDateTimeChange event but that did not do anything.,
procedure TframeEditIssue.grdDetailsDateTimeChange(Sender: TObject; ACol, ARow:Integer; ADateTime: TDateTime);begingrdDetails.Cells[ACol,ARow] := FormatDateTime('yyy-MM-dd',ADateTime);end;
Am I doing something wrong?
Dave