Javascript 如何以编程方式设置剑道日期选择器最小值?
我有剑道日期选择器在我看来,我也有一个下拉列表,我需要帮助设置日期选择器最小值编程。当type下拉列表值更改时,我希望将数据选择器限制为type.text=x,set minValue=currentYear-1,type.text=y,set minValue=currentYear-2 我有一个字体下拉列表Javascript 如何以编程方式设置剑道日期选择器最小值?,javascript,jquery,asp.net-mvc,kendo-ui,kendo-asp.net-mvc,Javascript,Jquery,Asp.net Mvc,Kendo Ui,Kendo Asp.net Mvc,我有剑道日期选择器在我看来,我也有一个下拉列表,我需要帮助设置日期选择器最小值编程。当type下拉列表值更改时,我希望将数据选择器限制为type.text=x,set minValue=currentYear-1,type.text=y,set minValue=currentYear-2 我有一个字体下拉列表 <input id="type" /> <script> $("#type").kendoDropDownList({
<input id="type" />
<script>
$("#type").kendoDropDownList({
dataSource: [
{ id: 1, name: "x" },
{ id: 2, name: "y" }
],
dataTextField: "name",
dataValueField: "id"
});
</script>
我喜欢应用以下条件
if Type = x then minValue = currentYear-1
if Type = y then minValue = currentYear-2
else display as is
if Type = x then minValue = currentYear-1
if Type = y then minValue = currentYear-2
else display as is