JQuery UI Datepicker CSS 格式化表数据 (td)

发布于 2024-11-16 14:01:22 字数 669 浏览 3 评论 0原文


我使用 JQuery 日期选择器来选择预订表单的日期。有一些日期无法选择,所以我禁用了它们。这工作得很好。现在,我尝试在预订之前和之后标记到达和离开日期。

如果预订不是在月初开始,那么这很好用。但有些情况下,这不起作用。

请访问 http://bnob.ch/de/index.php 查看示例。看看八月份的预订情况。第一个预订的抵达和离开日期不起作用,第二个预订正确。

CSS 代码:

#ui-datepicker-calendar {
border-collapse: separate;
}
td.disabled {
padding: 1px;
background-color: red;
}
td.departure {
padding: 1px 0 0 1px;
background-color: red;
}
td.arrival {
padding: 0 1px 1px 0;
background-color: red;
}

这两个条目有什么不同?我没有找到任何带有萤火虫的东西。看起来一模一样。
表中的继承是否处于活动状态,我还没有看到?

感谢您提供任何信息

最好的问候丹尼斯

I use the JQuery datepicker to select a date for a reservation form. There are some dates that aren't selectable, so I disabled them. This works prety fine. Now I tried to mark the arrival and departures dates before and after the reservation.

This works fine, if the reservation doesn't begin at the start of the month. But there are some cases, that doesn't work.

Visit http://bnob.ch/de/index.php for the example. Look at the reservations in august. The arrival and departure date of the first reservation doesn't work, the second works correctly.

CSS code:

#ui-datepicker-calendar {
border-collapse: separate;
}
td.disabled {
padding: 1px;
background-color: red;
}
td.departure {
padding: 1px 0 0 1px;
background-color: red;
}
td.arrival {
padding: 0 1px 1px 0;
background-color: red;
}

What is the different between this two entries? I didn't find any with firebug. It looks exactly the same.
Is an inheritance in the table active, that I didn't see yet?

Thank you for any informations

Best regards Denis

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别再吹冷风 2024-11-23 14:01:22

谢谢你让我走上正确的道路。

边框也是我的第一个决定,但我没有看到选择子元素(锚点或跨度)的可能性。 td 上的声明带有边框看起来不太漂亮。

要设置边框样式,您应该在子元素上使用它:

.disabled span { border: 1px solid red !important; }

.otherStyle a { border-bottom: 1px solid red !important; border-right: 1px solid red !important }

Thank you to get me on the right way.

The border was also my first decision, but I didn't see the posibility to select the child element (anchor or span). The declaration on the td don't look very pretty with a border.

To style your border you should use it on the child elements:

.disabled span { border: 1px solid red !important; }

.otherStyle a { border-bottom: 1px solid red !important; border-right: 1px solid red !important }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文