1

I added a differt color in my datepicker for dates that are occupied, and i also return "false" to make them not selectable. But when i use false the color is becomming gray, i assume that there is a div over the date that makes him unselectable. But how can i make that div 100% transparant?

Code:

beforeShowDay:function highlightDays(date) {
                var timestamp = new Date(Date.UTC(date.getFullYear(),date.getMonth(),date.getDate()));
    var timestamp = timestamp/1000;
    if ($.inArray(timestamp, verhuurt) != -1){
                   return [false,'verhuurt'];
                }
                else if ($.inArray(timestamp, gesloten) != -1) {
                  return [false,'gesloten'];
            }
                else if ($.inArray(timestamp, wisseldagen) != -1) {
                  return [true,'wisseldag'];
            }
                else{return [true, 'beschikbaar'];}
            }

CSS (For the unselectables):

.ui-datepicker-unselectable.gesloten span.ui-state-default{background:#999999 !important; border-color:#999999 !important;text-decoration: line-through;}
.ui-datepicker-unselectable.verhuurt span.ui-state-default {background:#FF6600!important; border-color:#FF6600 !important;color:#FF9966  !important;text-decoration: line-through;}
4

1 回答 1

1

您可以覆盖ui-state-disabled类不透明度并将其设置为 1。

代码:

.ui-state-disabled{
    opacity: 1 !important;
}

演示:http: //jsfiddle.net/IrvinDominin/Eqt6s/

于 2013-10-05T19:35:14.547 回答