Stefanowitsch Posted March 8, 2022 Share Posted March 8, 2022 I placed a simple "Start Date" - Date Field inside a repeater. I set the options of this date field so that the jQuery UI Datepicker is used when clicking on the calendar icon next to the field. When editing my template this calendar icon is missing. So the datepicker never opens. I can however change the functionality of the field so that the datepicker opens when the field is focused. This works fine. When displaying the same field on the template outside of the repeater field though, the calendar icon is displayed correctly and works as expected. Is this a normal behaviour? What the date field looks inside a repeater field: What the date field looks like when added to the template outside of a repeater field: Link to comment Share on other sites More sharing options...
Robin S Posted March 8, 2022 Share Posted March 8, 2022 The JS is missing a call to initialise the datepicker when a field is reloaded (e.g. when an ajax-loaded Repeater item is opened). You could open a GitHub issue if you like. InputfieldDatetime.js needs something like this added: $(document).on('reloaded', '.InputfieldDatetime', function() { var $input = $(this).find('input.InputfieldDatetimeDatepicker:not(.InputfieldDatetimeDatepicker3):not(.initDatepicker)'); if($input.length) InputfieldDatetimeDatepicker($input); }); 1 Link to comment Share on other sites More sharing options...
Stefanowitsch Posted March 8, 2022 Author Share Posted March 8, 2022 Okay that explanation seems logical to me. I will stick to the "datepicker on focus" option then. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now