problem when cloning jQuery UI datepicker

后端 未结 12 1610
谎友^
谎友^ 2020-11-29 05:36

I have a div in which there is a datepicker. I use something like this to clone it:

mydiv = $(\'#someDiv\');

// works fine so far
mydiv.find(\'input.datefie         


        
12条回答
  •  抹茶落季
    2020-11-29 05:59

    If you call .datepicker('destroy').removeAttr('id') before cloning and then re-init the date picker it will work.

    This seems to be a bug with destroy since it is supposed to return the element back to it's original state.

提交回复
热议问题