Fix placement for RTL languages

Hi,

Although RTL support has long been implemented, there stil seemed to be a problem with placement of the datepicker within a RTL environment. See for example https://github.com/eternicode/bootstrap-datepicker/issues/1079. This fix is inspired by pull request https://github.com/eternicode/bootstrap-datepicker/pull/483, which was never merged.