I have the following input, which I'm attaching datetimepicker to on pageload:
This works as expected.
When the user clicks a button, I duplicate this input to allow for multiple dates.
Clone code:
The cloning works as expected, but clicking the date input triggers this error:
Uncaught Error: datetimepicker component should be placed within a relative positioned container
.input-group
already has "position: relative;"
set in a separate CSS file. I tried adding this as an inline style, but id didn't make a difference.
Any ideas? Thanks in advance!
Solved! Swapped the order of my
.datetimepicker
andinsertAfter
functions. Was trying to add a datetimepicker to an input that didn't yet exist.