Calendar doesn't show if form is displayed in a modal or the form is embeded through an ajax call

Created on 6 March 2021, over 4 years ago
Updated 22 June 2025, 14 days ago

Hello!

As the title says, I'm having two issues:

1. I'm displaying the node/add and node/edit forms in modals and the calendar doesn't show up--libraries not included. I had to manually attach the materialize_datetime_picker library in hook_form_alter to make it work

2. I also use custom forms that are displayed after ajax calls. The calendar doesn't work either. I had to manually attach the library to the page that embeds the ajax button that displays the form.

Not a big deal, but I think it would help if the library would load automatically whenever a form that contains a materialize_date_time type element.

Can't really say if this is a bug or a feature request, but I think it would be awesome to not have to manually attach the library.

Thank you!

🐛 Bug report
Status

Fixed

Version

6.0

Component

Code

Created by

🇷🇴Romania trudog

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024