Apply jQuery datepicker to multiple instances

后端 未结 12 2320
时光说笑
时光说笑 2020-11-27 14:04

I\'ve got a jQuery date picker control that works fine for once instance, but I\'m not sure how to get it to work for multiple instances.



        
12条回答
  •  离开以前
    2020-11-27 14:34

    In my case, I had not given my elements any ID, and was using a class to apply the datepicker as in SeanJA's answer, but the datepicker was only being applied to the first one. I discovered that JQuery was automatically adding an ID and it was the same one in all of the elements, which explained why only the first was getting datepickered.

提交回复
热议问题