克隆一个包含"customized"元素的divjQueryUI datePicker
我的div包含3个字段
I have a div that contains 3 fields
您可以在此处看到图像
http://imgur.com/A3tbd.jpg
You can see the image here
http://imgur.com/A3tbd.jpg
我正在使用此插件克隆此div
http://sroucheray.org/blog/demos/jquery-dynamic-form/
I'm cloning this div with this plugin
http://sroucheray.org/blog/demos/jquery-dynamic-form/
我的问题是:
- 它不能正确克隆datePicker.
- 我正在使用验证表单插件,但我想这个插件没有准备好验证克隆的元素
在执行此序列操作时,是否应该使用任何简单的代码,其他插件或某些功能?
Is there any easy code, other plugin or some functions I should use for doing this sequence?
- 验证用户已填写实际div的3个字段
- 如果是,请克隆div并创建一组新的3个字段.另外,正确克隆datePicker
- 如果用户单击删除按钮,则删除最后一个div(最后3个字段)
- 提交表单后,正确张贴所有字段
谢谢
我遇到了一个类似日期选择器并克隆它的问题.我的解决方案是在克隆元素之前删除日期选择器.然后,在克隆元素之后,在克隆上初始化日期选择器.
I ran in to a problem just like that with the date picker and cloning it. My solution was to remove the date picker prior to the cloning the elements. Then after cloning the elements, initialize the datepicker on the clone.