我想创建一个jQuery日期选择器,其中星期日将被禁用,前几天将被禁用,包括当天下午3点30分以及假期。这是我到目前为止所做的。任何人都可以帮助我如何添加假期?
import numpy as np
A = np.arange(1.,5.,1)
G = np.array([[1.,2.],[3.,4.]])
def calcF(G,A):
N = A.size
print A
print N
F = []
for l in range(N):
F.append(G/A[l])
print F[l]
for j in range(N):
if j != l:
F[l]*=((G - A[l])/(G + A[j]))*((A[l] - A[j])/(A[l] + A[j]))
return F
F= calcF(G,A)
print F

星期日禁用和前几天被禁用我只需要帮助来禁用假期
答案 0 :(得分:0)
var currentTime = new Date();
var timeCond = currentTime.getHours() >=15 && currentTime.getMinutes() >=30;
var holidays = ["1/12/2016"]; // add holidays
$(document).ready(function() {
$('#datepicker').datepicker({
minDate: timeCond?1:0,
beforeShowDay: visibilityHandler
});
function visibilityHandler(date){
if(holidays.indexOf(date.toLocaleDateString()) != -1)
return [false,'']
return noSunday(date);
}
function noSunday(date){
var day = date.getDay();
return [(day > 0), ''];
};
});