jQuery 日期选择器排除日期
我想要从 jQuery datepicker ui 中执行各种类型的排除日期。这些在下面。
- 单一日期:一个或多个特定日期。
- 循环日:这些日子应始终从日历中禁用,例如;星期日。
- 循环日期:应始终禁用特定日期。
- 期间:禁用两个日期范围之间的日期。
- 循环周期:禁用两个日期范围之间的循环日期。
我的 JSON 数据
{ “单身的”: [ “2012 年 2 月 4 日”, “2012 年 3 月 2 日” ], “循环日”:[ 0 ], “循环日期”:[ 28 ], “时期”: [ { “来自”:“2012年2月21日”, “至”:“2012 年 2 月 22 日” } ], “循环周期”:[ { “来自”:“2012年2月28日”, “至”:“2012 年 2 月 29 日”, “期间”:“每月” } ] }
我该怎么做,有人帮助我。
谢谢。
I want to do varies type of exclude dates from jQuery datepicker ui. Those are below.
- Single Date : one or more specific dates.
- Recurrent day : The days should always disabled from calender e.g; Sunday.
- Recurrent date : Particular date should be always disabled.
- Period : Disable dates between the two date ranges.
- Recurrent period : Disable dates between the two date ranges recurrently.
My JSON DATA
{
"single": [
"2/4/2012",
"3/2/2012"
],
"recurrent_day": [
0
],
"recurrent_date": [
28
],
"period": [
{
"from": "2/21/2012",
"to": "2/22/2012"
}
],
"recurrent_period": [
{
"from": "2/28/2012",
"to": "2/29/2012",
"period": "monthly"
}
] }
How can i do this, Some one help me.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
偷偷地使用
beforeShowDay
回调。抱歉耽搁了,我在 recurrent_period 中遇到了一个错误,花了我一段时间才发现。我在测试套件中添加了一个“年度”案例。如果我忽略了什么,请告诉我。有趣的问题! jsFiddleWith sneaky use of the
beforeShowDay
callback. Sorry for the delay, I had a bug in the recurrent_period that took me a while to spot. I added a "yearly" case to the test suite. Let me know if there's anything I have over-looked here. Fun question! jsFiddle