Attaching eonasdan-datetimepicker to dynamically c

2019-08-08 18:41发布

I have the following input, which I'm attaching datetimepicker to on pageload:

Screenshot 1

This works as expected.

When the user clicks a button, I duplicate this input to allow for multiple dates.

Clone code:

Screenshot 2

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

enter image description here

.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!

1条回答
放我归山
2楼-- · 2019-08-08 19:20

Solved! Swapped the order of my .datetimepicker and insertAfter functions. Was trying to add a datetimepicker to an input that didn't yet exist.

查看更多
登录 后发表回答