dangrossman/bootstrap-daterangepicker — pull request #483 by RustyToms (2014-10-30 03:03:14+00:00)
Title: fix calendar swap on setOptions

When the calendar is in the default open 'right' mode, the left and right calendars swap positions every time `setOptions` is called. This method is used not just in the creation of the datepicker, but whenever the existing datepicker is updated. In my case, I update the datepicker dates every time the datepicker is opened. This causes the starting date to alternate being on the left and right each time it is open. A JSBin of this effect is here, just click on the input more than once to see the effect: http://jsbin.com/yanuliwoco/1/edit?js,output

The simple solution I implemented is to add an additional class to each calendar that doesn't get swapped. The 'left' and 'right' classes can be adjusted based on these classes, making sure that they are put on the correct calendar, no matter how many times it is updated.

Here is the JSBin of the fix in action: http://jsbin.com/vuqoyecohe/2/edit?js,output

Here is a gif of the bug:
![datepicker_calendar_bug](https://cloud.githubusercontent.com/assets/5260472/4837918/32f5d694-5fe0-11e4-8dfc-a26cc7822055.gif)