Using Drupal Console, I created a custom content entity in which there is a 'date' field:

$fields['subscription_date'] = BaseFieldDefinition::create('datetime')  
  ->setLabel(t('Date souscription'))  
  ->setSetting('datetime_type', 'date')  
  ->setDefaultValue(array(0 => array(  
    'default_date_type' => 'now',  
    'default_date' => 'now',  

The edit-form works as supposed and, particularly, editing 'subscription_date' brings up the calendar popup:
enter image description here
In my custom module, I defined a table form to 'mass' edit this entity:
I defined the date field in the form this way:

$form['souscriptions'][$key]['date'] = array(  
    '#type' => 'date',  
    '#default_value' => $default_value,  

In Firefox, it looks like:
enter image description here and editing a date field doesn't show the date popup :-(
While in Chrome, it's OK:
enter image description here Any idea why?
What should I add to my form to have at least the simple calendar popup I have in my content entity edit-form?

Forgot to say: i'm using Drupal 8.4.2


This issue is coming because of jQuery confliction. Either you can update jQuery version or find out the confliction of jquery object.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.