Jquery Calander:加载页面日历时应根据 Start_date 和 End_Date 输入选择范围

发布于 2024-12-21 21:06:09 字数 128 浏览 3 评论 0原文

我正在使用 Jquery 日期选择器。在我的模块(PHP)中,当我尝试添加包详细信息时,我需要以其他颜色显示已选择日期的日期选择器。这样管理员就不会将这些选定的日期用于新包。

请帮我。提前致谢。

问候, 普拉布

I am using Jquery Datepicker. In on of my module (PHP) when i am trying to add package details i need to show the date picker with already selected dates in other color. So that admin will not use those selected dates for new package.

Please help me. Thanks in advance.

Regards,
Prabu

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

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

发布评论

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

评论(1

枫林﹌晚霞¤ 2024-12-28 21:06:09

我不清楚您是否试图将选择限制在特定日期范围内,或者是否要禁用某个范围内的任意日期。

如果是前者,您应该能够在初始化日期选择器时指定 minDatemaxDate。请参阅此处

如果是后者,您应该能够使用 beforeShowDay 选项。 这个问题。返回值的第二个元素是一个类名 - 将其与一些相应的 CSS 一起使用将允许您看到颜色。您可以通过返回 false 作为返回值的第一个元素来完全停止选择它。

I'm not clear on whether you're trying to limit the selection to a specific date range, or whether you want to disable arbitrary dates within a range.

If it's the former, you should be able to specify minDate and maxDate when initialising datepicker. See here.

If the latter, you should be able to use the beforeShowDay option. There's a nice explanation on this question. The second element of the return value is a class name - using that with some corresponding CSS will allow you to see the colour. You can stop it being selected at all by returning false as the first element of the return value.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文