Skip to content

Commit

Permalink
Merge pull request #1973 from nwhittaker/master
Browse files Browse the repository at this point in the history
Fix RTL layout
  • Loading branch information
acrobat authored Aug 19, 2016
2 parents 4c47c11 + 3389c98 commit d0df93c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions js/bootstrap-datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,13 @@
this.picker.addClass('datepicker-orient-right');
left += width - calendarWidth;
} else {
// Default to left
this.picker.addClass('datepicker-orient-left');
if (this.o.rtl) {
// Default to right
this.picker.addClass('datepicker-orient-right');
} else {
// Default to left
this.picker.addClass('datepicker-orient-left');
}
}
}

Expand Down
1 change: 1 addition & 0 deletions less/datepicker.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
direction: ltr;
&&-rtl {
direction: rtl;
&.dropdown-menu { left: auto; }
table tr td span {
float: right;
}
Expand Down
1 change: 1 addition & 0 deletions less/datepicker3.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
direction: ltr;
&&-rtl {
direction: rtl;
&.dropdown-menu { left: auto; }
table tr td span {
float: right;
}
Expand Down

0 comments on commit d0df93c

Please sign in to comment.