customd / jquery-calendar

A full day, week, and resource calendar for use with jQuery.
MIT License
62 stars 26 forks source link

HTML 'ID' attribute for the Events in calendar . #6

Open krisnakp opened 11 years ago

krisnakp commented 11 years ago

Hi Sam,

I am looking for assigning 'id' attribute to each event div generated by the calendar api. This will help in automation testing as the automation tool we use can easily identify any element in the HTML dom using standard attributes like 'id' or 'name' etc. I understand that uid property that I pass with every event definition is listed as attribute named 'data-id' for the generated

but that doesn't helps me much as it is not a standard HTML attribute. My requirement is(Last one is optional):

Each event should be uniquely identifiable by 'id' attribute. I should be able to pass the id value while defining the event(just like uid property). If no value is specified for id during definition of event then api should auto-generate and assign sequential numbers as id for each event . Please help me with this.

Thanks -Krishna K P

samatcd commented 11 years ago

A surprising number of browsers support CSS targeting of elements using arbitrary attributes like data-id.

div[data-id]{} works in IE7+: http://css-tricks.com/attribute-selectors/

I'm guessing the issue is that your testing tool won't read non-standard attributes?