0
点赞
收藏
分享

微信扫一扫

前端——Kendo UI的一些知识点


1.下拉框

效果:

前端——Kendo UI的一些知识点_时间插件

HTML部分:

<input id="dw"/>

JS部分:

//金额单位
var dw = [
{ text: "", value: "" },
{ text: "人民币", value: "元人民币" },
{ text: "美元", value: "美元" },
{ text: "欧元", value: "欧元" },
{ text: "英镑", value: "英镑" }
];
$("#dw").kendoDropDownList({
dataTextField: "text",
dataValueField: "value",
dataSource: dw,
index: 1,
change: function (e) {
$("#search-sfydjy input").attr("value", e.id);

}
});

2.时间插件只显示年份

效果:

前端——Kendo UI的一些知识点_kendoui部分知识点_02

HTML部分:

<input type="text" id="ssnd" class="date-picker" data-format="yyyy" data-bind="value:dataKendo.SSND"/>

JS部分:

$("#ssnd").kendoDatePicker({
start:"decade",
depth: "decade",
format: "yyyy"
});

解读:

depth:导航深度(最低级别)

可选以下值:

1."month":显示本月所有日期

2."year":显示本年所有月份

3."decade":显示这个区间的十个年头

4."century":显示本世纪的每个十年区间

start:默认初始视图

可选值有"month"、 "year"、 "decade"、 "century"四种视图

format:格式化

格式化日历使用value()方法返回的值


举报

相关推荐

0 条评论