简体   繁体   English

jQuery日期选择器与自定义日期选择器

[英]JQuery Date Picker Vs Customized Date picker

I have a date picker which is based on Javascript and customized by me at: 我有一个基于Javascript并由我自定义的日期选择器:

http://jsfiddle.net/premseoul/BjDYP/6/ http://jsfiddle.net/premseoul/BjDYP/6/

The main problem with this date picker is I cant able to create multiple instances. 此日期选择器的主要问题是我无法创建多个实例。

But the date picker based on jquery is working fine at: 但是基于jquery的日期选择器在以下方面运行良好:

http://jsfiddle.net/premseoul/amV5g/ http://jsfiddle.net/premseoul/amV5g/

I want multiple instances in the date picker which is customized by me. 我要在我自定义的日期选择器中使用多个实例。

Your .js fiddle doesn't work (won't trigger callendary). 您的.js小提琴不起作用(不会触发被告)。 Also the html code is quite messy. html代码也很凌乱。

Otherwise - jquery datepicker uses a class ("datepicker" in most cases) to trigger it while yours uses and id . 否则-jquery datepicker使用一个class (在大多数情况下为“ datepicker”)在您使用and id触发它。 And id has to be unique on page. id必须在页面上唯一。 And since you want multiple instances you cannot give them same id as that will mess up the triggers. 而且,由于您需要多个实例,因此无法给它们提供相同的ID,因为那样会使触发器混乱。

You will have to produce an unique id for each instance. 您将必须为每个实例产生一个唯一的ID。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM