I created a custom entity type that has a base field definition like this:
$fields['start_date'] = BaseFieldDefinition::create('datetime')
->setLabel(t('Start Date'))
->setDescription(t('The date and time to start.'))
->setDisplayOptions('view', array(
'type' => 'datetime_default',
'weight' => 3,
))
->setDisplayOptions('form', [
'type' => 'datetime_default',
'weight' => 3,
])
->setRequired(TRUE);
When I create a view that displays entities of this type, and try to create a filter on this base field, I get the generic filter provided by views, instead of the one defined in Drupal\datetime\Plugin\views\filter\Date
.
Why is that?