问题描述
我在这里下载了multiDatesPicker:
I downloaded multiDatesPicker here:http://multidatespickr.sourceforge.net
我的问题是..
我只使用multiDatesPicker代码添加日期代码。
I'm using multiDatesPicker only for represent added dates by codes.
我不想收到任何用户交互。
And I don't want to receive any user interaction.
我知道如何禁用multiDatesPicker唯一的办法是禁用:真选项。
,但这会使日历的添加日期按钮颜色发生变化。
The only thing that how to disabling multiDatesPicker I know is "disabled: true" option.but this makes the calendar's added dates button color changed.
我已经尝试使用css(.ui-state-disabled)改变不透明度,但只是不透明度
I already tried changing opacity using css(.ui-state-disabled) but it was just opacity.
有没有谁知道如何禁止日历而不改变任何我们可以看到的东西?
Is there anyone who know how to just disabling calendar without changing anything that we can see ?
推荐答案
自我回答
此解决方案适用于datepicker和多重选择只需按两步
this solution is work in both datepicker and multidatespicker. just follow 2 steps
首先,在您的jquery中更改javascript
ui.datepicker.js源代码,下面找到
in your "jquery.ui.datepicker.js" source codes, find below
(unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' :
'<a class="ui-state-default' + ..
并将其更改为:
(/*(unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' :
*/'<a class="ui-state-default' +
第二,添加CSS样式
#yourCal .ui-state-disabled {
BACKGROUND-IMAGE: none; FILTER: none; opacity: .99;
}
.ui-datepicker .ui-datepicker-calendar .ui-state-highlight a {
background: #743620 none;
color: white;
}
这篇关于multiDatesPicker:如何禁用点击而不改变日期按钮颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!