Bind the .datepicker() to new input elements

强颜欢笑 提交于 2019-12-11 04:55:21

问题


I am trying to add the datepicker to input elements created on the fly.I understood the usage of .on() or .live() function but I can't find the right event to bind them on:

Trying to use .on since live() got depercated I succeded the following: On input field click it's turned into a datepicker input

 $("#container").on("click", ".date", function(){
        $(this).datepicker()
  });

But I need this on the onload event which does not exist on inputs.

来源:https://stackoverflow.com/questions/11716536/bind-the-datepicker-to-new-input-elements

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!