jQuery UI DatePicker检查是否禁用了日期
我正在从事在线课程预订项目 在其中,我动态地获得了日期。
例如:如果学生选择了每个星期一的特定日期范围和选定的类,则使用jQuery,我将从选定的日期范围内检索所有星期一。
我的数组如下所示。
var all_dates = ['07/25/22', '08/01/22', '08/08/22', '08/15/22', '08/22/22', '08/29/22', '09/05/22', '09/12/22', '09/19/22'];
现在我想在日历中设置一个日期, 为此,我正在使用以下代码 $('#booking_calender')。datePicker('setDate',all_dates [0]);
这是一个条件,教师设置了他们的avaiblity,因此,如果教师在上不可用,则'07/25/22',它应该选择下一个日期。
在日历上,如果老师不可用,则该日期已禁用(请检查屏幕截图)。
那么,我的问题是,设置日期之前,我将如何检查日期是否被禁用。
I am working on Online Class Booking Project
in which I am getting dates array dynamically.
For example : if a student has selected a particular date range and selected classes for every Monday, then using jQuery , I am retrieving all the Monday from that selected date range.
I am getting array as shown below.
var all_dates = ['07/25/22', '08/01/22', '08/08/22', '08/15/22', '08/22/22', '08/29/22', '09/05/22', '09/12/22', '09/19/22'];
Now I want to set a date in the calendar ,
for that I am using the following code$('#booking_calender').datepicker('setDate', all_dates[0]);
Here is one more condition, Teachers have set their avaiblity , so if the teacher is not available on '07/25/22' then it should select the next date.
on calendar , if the teacher is not available then that date is disabled ( Please check the screenshot ).
So , my question is , before setting a date , how will I check if the date is disabled or not.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论