jquery-week-calendar icon indicating copy to clipboard operation
jquery-week-calendar copied to clipboard

switchDisplay bug with multiples instances

Open gildonei opened this issue 13 years ago • 0 comments

I'm using the version 2.0-dev and when I create 2 instances of the calendar with the same configuration, but displaying diferent data, the buttons on switch display doesn't work properly.

The actions on the buttons are always trigged on the first rendered calendar.

I've observed that when I've the same labels on diferent calendars, they've the same "Ids" causing the crash.

I solved this problem modifying the following lines:

716: var _randId = Math.random(99999).toString().substr(2,7); (added) 717: var _id = 'wc-switch-display-' + option + '-' + _randId; (modified)

I hope it can be usefull.

gildonei avatar Jan 23 '12 14:01 gildonei