问题
//datepicker
$('dob').on('click',function(){
$('.datepicker').datepicker({
"format": "dd/mm/yyyy",
"autoclose": true
});
});
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.1/css/datepicker.css" rel="stylesheet" type="text/css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/3.1.3/js/bootstrap-datetimepicker.min.js"></script>
<link href="assets/css/common-rtl.min.css" rel="stylesheet" type="text/css" />
<form class="form-horizontal" action="employee.cfm" method="post" role="form">
<div class="container col-md-12">
<div class="col-md-8 jumbotron">
<div class="form-group">
<label class="control-label col-sm-3" for="dob">تاریخ پیدائش</label>
<div class="controls col-sm-3">
<input type="text" id="dob" name="dob" placeholder="DOB" class="form-control datepicker" value="">
</div>
</div>
</div>
</div>
</form>
I have created a page in arabic language the content of the page were right to left.In a text field, I have added a datePicker which is not aligned correctly.
I have used commenrtl.css for this.

回答1:
Bootstrap datepicker has an orientation option. You can use this to place it left:
//datepicker
$('dob').on('click',function(){
$('.datepicker').datepicker({
"format": "dd/mm/yyyy",
"autoclose": true,
"orientation": left
});
});
http://bootstrap-datepicker.readthedocs.org/en/latest/options.html#orientation
If that doesn't help you could always use a css transform to flip an element:
transform: rotateY(130deg);
Though it doesn't work in IE9 and lower.
https://developer.mozilla.org/en-US/docs/Web/CSS/transform
来源:https://stackoverflow.com/questions/27901554/how-align-the-datepicker-right-to-left