- π¨π¦Canada danrod Ottawa
This was reported a while ago (thanks @ochenk) I was able to replicate this in my local environment, I'll work on this.
- π΅π±Poland ad0z
@danrod Do you need help with it? (As the issue seems to be not moving)
The source and solution seems to be quite simple and I may fix it(just let me know or assign this issue to me), what I propose is to add a class "widget-WIDGET-NAME" to elements, instead of passing field name only, and update JS libraries to support widget init by class name.
Code:$element['#attached']['drupalSettings'][$callback_library['extension']][$callback_library_name][$field_name] = $js_options;
if (call) { // Find the element by field name. var $element = $( 'input[name^="' + fieldName + '["][class^="form-time"]', context );
needs to be rewritten to be more flexible.
- Issue was unassigned.
- π¨π¦Canada danrod Ottawa
Hello @ad0z could you create a MR for it, please? Go for the fix, thanks !
- Assigned to ad0z
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 10:24pm 16 December 2023 - π΅π±Poland ad0z
@danrod pushed changes to issue fork, I've tested it on D10 only.
- π¨π¦Canada danrod Ottawa
Didn't work for me, did you miss committing your changes in other files? I'll create a patch sometime for it today.
- Status changed to Needs work
about 1 year ago 4:45pm 19 December 2023 - π΅π±Poland ad0z
@danrod I think I did not miss anything, but I can verify it tomorrow.
- π΅π±Poland ad0z
@danrod interesting and it seems I pushed everything and it's working for me. Are you sure you have setup everything correctly? Does it not work at all or maybe for one case only? Cache maybe? Can you check it again and provide more info?
- π¨π¦Canada danrod Ottawa
I know what the issue was, I was testing the changes on a D10 instance and you created the MR against the 8.x-2.x branch, I tested it on a D9 branch and worked fine for Datetime fields not in paragraphs, but It still not working at all for fields in paragraphs:
I'll look in this later today or tomorrow, I also saw some issues while testing this one, I'll create separate issues for that
- π΅π±Poland ad0z
@danrod I was testing it on 3.x and it was working as well, as we can see the issue is related with this part of code:
const input = $(el).find('input[type="time"]'); if (input.length === 0) { return; } // Set default hour and minute for the AddonTimepicker. var timeValues = input.val().split(':');
input.val()
returns undefined, kinda strange, element should be loaded at this point, value is there as we can see on the screenshot. Can you check what input variable contains by console.log or debug? - Status changed to Needs review
12 months ago 5:40pm 28 December 2023 - π¨π¦Canada danrod Ottawa
Hello @ad0z, I just tested it again on my D9 instance and It seems to work now:
I'll create another MR for applying the changes in the 3.0.x branch as well.
- Status changed to RTBC
12 months ago 5:52pm 28 December 2023 -
danrod β
committed 1b6c96e1 on 8.x-2.x
Resolve #3034201 "Incompatible with paragraphs"
-
danrod β
committed 1b6c96e1 on 8.x-2.x
-
danrod β
committed a688d366 on 3.0.x
Resolve #3034201 "Incompatible with paragraphs"
-
danrod β
committed a688d366 on 3.0.x
- Status changed to Fixed
12 months ago 8:58pm 28 December 2023 - π¨π¦Canada danrod Ottawa
Committed and attributed. I will create a tag release soon.
Automatically closed - issue fixed for 2 weeks with no activity.