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 single_date_time AJAX is never triggered on change.

CommentFileSizeAuthor
#3 ajax-3117460-3.patch979 bytesnicola85
#2 ajax-3117460-1.patch1.35 KBnicola85

Comments

alemadlei created an issue. See original summary.

nicola85’s picture

StatusFileSize
new1.35 KB
nicola85’s picture

StatusFileSize
new979 bytes
billdaff’s picture

Thanks for patch in comment #3! Worked great for me.

jcnventura’s picture

Status: Active » Reviewed & tested by the community

RTBC as per #4

jcnventura’s picture

Status: Reviewed & tested by the community » Fixed

  • jcnventura committed fb838fbf on 2.x
    Issue #3117460 by nicola85, billdaff, jcnventura: Does not work with #...

Status: Fixed » Closed (fixed)

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