tazsingh / will_pickdate

Easy to use and well designed date picker widget with year in decades, month in year, day of month, and time of day support.
http://tazsingh.github.io/will_pickdate/
33 stars 10 forks source link

Invalid HTML generated by multiple pickers #14

Open sparky672 opened 11 years ago

sparky672 commented 11 years ago

I have several date & time fields so I need to invoke the plugin several times on the same page.

The plugin is dynamically creating invisible input fields, each with its own id="undefined_display".

Duplicate id's on the same page is invalid HTML... can we update plugin so that this is a class instead?

Thanks!

sparky672 commented 11 years ago

I see from the code that it's simply trying to use the initial id of the original input element. However, I don't have id's on my inputs on this page. They are not required for this project and they are not required to make valid HTML.

There needs to be a fallback for when there is no id, in order to avoid a duplication of this id="undefined_display".