我想知道是否可以输入类型日期以将默认年份设为2017年。我所能做的就是设置一个默认日期,其中包括日期和月份太:
<input type="date" value="2017-12-21">
<br><br>
<input type="date" value="2017-mm-dd">
<br><br>
<input type="date" value="2017">
<br><br>
<input type="date">
&#13;
我希望它将日期显示为dd
,将月份显示为mm
,将年份显示为2017
。
答案 0 :(得分:0)
import pandas as pd
A = pd.Series(['amsterdam', 'delhi', 'chromepet', 'tokyo', 'others'])
B = pd.Series(['chromepet', 'tokyo', 'tokyo', 'delhi', 'others'])
# Find index position of B's items in A
B.map(lambda x: np.where(A==x)[0][0]).tolist()
尝试像这样的min和max属性。它应该工作
答案 1 :(得分:-1)
尝试这个,作为一种解决方法,如果所有其他方法都失败了......
这是 WORKING DEMO
<form>
<div>
<input type="date" min="2017-01-01" max="2017-12-31">
</div>
</form>