Viewing 1 reply thread
  • Author
    Posts
    • #7295
      luxdelux
      Participant

      So I decided to add the datetimepicker for some of my fields in a Add More field group.
      https://github.com/xdan/datetimepicker

      Works great, however I can’t figure out how to load it on every added field.

      $('.piklist-field').on('click', '[data-piklist-field-addmore-action]', function(){ 
      	setTimeout($('.input').datetimepicker();
      });

      This code works but only after every second click. I understand why it happens since it triggers on existing DOM elements right? Anyone have an idea? I probably messed up somewhere in my logic here 🙂

    • #7296
      luxdelux
      Participant

      Oh and please ignore the setTimeout function, I was experimenting with something

Viewing 1 reply thread
  • You must be logged in to reply to this topic.