Allow to filter (in a view) on a datetime field of a custom entity
As there are so many difficulties with base fields (sorting, displaying, filter etc in views), I decided to remove all of them and I re-created them back in the field UI.
To allow this, I set fieldable = TRUE, and field_ui_base_route = some_path in the annotations of my entity.
This is of course poor design because each field will create a table on its own but I had no time to spend on this...
Feel free to provide a better answer... I think we need a real how-to to provide the same functionalities we have for fields created in UI then for base fields
Edit to add: I have created an issue to create an help item on this topic: https://www.drupal.org/project/drupal/issues/3213021