jquery Datepicker:更改上一个和下一个按钮的位置

问题描述 投票:0回答:2

尝试使用阿拉伯语日期选择器。我可以更改所有内容,例如阿拉伯语中的月份和日期,以及 RTL 中的日期选择器格式。

但是。 我无法更改上一个和下一个按钮的位置。他们的立场没有改变。有没有人可以帮助我做到这一点?

英文: enter image description here

阿拉伯语: enter image description here

如果问题不清楚,请发表评论。谢谢你。

javascript datepicker datetimepicker
2个回答
0
投票

您可以更改上一个和下一个按钮上的左右样式属性,如下所示:

.ui-datepicker-rtl .ui-datepicker-prev,
.ui-datepicker-rtl .ui-datepicker-prev:hover {
     left: auto;
     right: 2px;
}

.ui-datepicker-rtl .ui-datepicker-next,
.ui-datepicker-rtl .ui-datepicker-next:hover {
    right: auto;
    left: 2px;
}

输入适合您的任何 px。


-1
投票

这非常简单,因为 Jquery 已经具有 RTL 功能。 在日期选择器的初始化中执行以下操作

$( ".selector" ).datepicker({ isRTL: true });

了解更多信息: http://api.jqueryui.com/datepicker/#option-isRTL

以下内容仅供以上用户使用

注意:我认为你必须删除你对“RTL中的日期选择器格式”所做的事情

© www.soinside.com 2019 - 2024. All rights reserved.