I have not much experience with the datepicker controls, but usually the difference between the generic and the standard version is the implementation.
The standard versions are the ones provided by your operating system.
The generic versions are implemented via basic wx or wxPython widgets or the screen painting is handled by wx or wxPython. If you use an inspection tool or a screen reader, you may see different widgets. E.g. for the date pickers NVDA is telling me ‘combobox’ for the generic version. On Mac or Linux this could be different.
I can retrieve the combo box via GetChildren()[0]
.
If your OS does not have a standard implementation, then wx should fall back to the generic implementation.
So, if you need the same look and feel on all your platforms, use the generic versions.
Usually you want platform specific look and feel and therefore you will use the standard version.
You should be able to extract the month from the widget or the DateEvent.
E.g. self.datepicker.GetValue().GetMonth()
should return 0 for January and 1 for February.
I don’t think you can customize the display in the way you want as the ‘SetFormat’ method is not exposed.
With the generic version you may use code like this, though:
combobox = self.datepicker.GetChildren()[0]
combobox.SetValue("01. January 2022")
If this does not work or has unwanted side effects, you need to implement your own version.
For the C++ implementation see here:
https://github.com/wxWidgets/wxWidgets/blob/204db7e76a8359ad76366de273e146d8566ac3e2/src/generic/datectlg.cpp
https://github.com/wxWidgets/wxWidgets/blob/204db7e76a8359ad76366de273e146d8566ac3e2/include/wx/generic/datectrl.h
Regards,
Dietmar