Custom entity datetime field definition
Hard to tell which plugin is missing. A guess would be it is a missing field widget plugin which causes the error when you try to add a new field to the default form mode. Then change the plugin name to something like this:

  -&gt;setDisplayOptions('form', [
    'type' =&gt; 'datetime_default',


If this is not the error, then provide a full error message with a backtrace.