You could read here how to use an external libraries - link
I think they use the input ID, which isn’t the same in UI builder as the rendered HTML and the JS would be running against the rendered HTML?
Could you explain this in detail? What are you trying to do in UI-builder but without success?