Add support for date format to wxGridCellDateEditor too

This is needed to allow editing the cells using wxGridCellDateRenderer
with a custom format, otherwise the editor might parse the contents of
the cell differently from what is actually shown.

In particular, this ensures that using "date:%d.%m.%y" (or any other
custom format) as "cell type" works correctly, which wasn't the case
before.
This commit is contained in:
Vadim Zeitlin
2020-11-03 02:57:22 +01:00
parent 56ec476a3a
commit 705006615f
3 changed files with 26 additions and 4 deletions

View File

@@ -1092,8 +1092,14 @@ class wxGridCellDateEditor : public wxGridCellEditor
public:
/**
Date editor constructor.
@param format Optional format for the date displayed in the associated
cell. By default, the locale-specific date format ("%x") is assumed.
You would typically want to specify the same format as the one
used with the cell renderer, if a non-default one is used.
Note that this parameter is only available since wxWidgets 3.1.5.
*/
wxGridCellDateEditor();
explicit wxGridCellDateEditor(const wxString& format = wxString());
};