jquery-week-calendar
jquery-week-calendar copied to clipboard
switchDisplay bug with multiples instances
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.