我有一个问题要问。如何禁用从当前日期到6天的所有日期?简而言之,在
中禁用一周,包括现在class CustomArray:
def __init__(self):
self.array = []
def append(self, value):
self.array.append(value)
def __mul__(self, scaler):
return [n*scaler for n in self.array]
def __imul__(self, scaler):
#print('*= operation is called.', [n*scaler for n in self.array])
self.array = [n*scaler for n in self.array]
def __repr__(self):
return self.array.__str__()
customArray = CustomArray()
print(customArray.array)
#output:[]
customArray.append(5)
customArray.append(15)
customArray.append(25)
customArray.append(35)
customArray.append(45)
print(customArray)
#output:[5, 15, 25, 35, 45]
print(customArray*5)
#output:[25, 75, 125, 175, 225]
customArray *= 5
print(customArray)
#output:None
日历选择,有人吗?
答案 0 :(得分:1)
您可以为日期输入设置min
属性。使用date
功能设置最小日期:
<input type="date" name="date" id="date" min="<?=date('Y-m-d', strtotime('+6 days')) ?>">
这会禁用少于6天的日期: