Modifying a form with a hook we are able to use #AJAX for default date picker.

      $form['field_date_of_birth']['widget'][0]['value']['#ajax'] = [
        'callback' => 'people_form_alter_student_enable_legal_guardian',
        'event' => 'change',
        'progress' => [
          'type' => 'throbber',
          'message' => t('Verifying entry...'),
        ],
      ];

This will trigger the AJAX request and allow updating the form.

However, with the new type bootstrap_date_time AJAX is never triggered on change.

CommentFileSizeAuthor
#3 3117447-does-not-work-3.patch1.21 KBprashant.c
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alemadlei created an issue. See original summary.

prashant.c’s picture

@alemadlei

Thanks for raising this.

We need to test this scenario at our end.

prashant.c’s picture

Version: 8.x-1.2 » 3.0.1-alpha1
Status: Active » Needs review
StatusFileSize
new1.21 KB

The patch needs to be reviewed.

nader.mouldi made their first commit to this issue’s fork.

  • Prashant.c committed b0ef41bc on 4.x
    Issue #3117447 by Prashant.c, nader.mouldi: Does not work with #AJAX
    
prashant.c’s picture

Status: Needs review » Fixed

Fixed in the new release for Drupal 10.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.