博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
HTML5 Web app开发工具Kendo UI Web教程:如何配置Kendo UI Calendar
阅读量:7106 次
发布时间:2019-06-28

本文共 1759 字,大约阅读时间需要 5 分钟。

    Kendo UI Web包含数百个创建HTML5 web app的必备元素,包括UI组件、数据源、验证、一个MVVM框架、主题、模板等。本文来看看如何配置Kendo UI Calendar。

1、创建新的操作方法来显示视图:

public ActionResult Index(){    return View();}

2、添加日历

WebForms

<%: Html.Kendo().Calendar()    .Name("calendar") //The name of the calendar is mandatory. It specifies the "id" attribute of the widget.    .Min(new DateTime(2010, 1, 1, 10, 0, 0)) //Set min time of the calendar    .Max(new DateTime(2010, 1, 1, 20, 0, 0)) //Set min date of the calendar    .Value(DateTime.Now) //Set the value of the calendar%>

Razor

@(Html.Kendo().Calendar()    .Name("calendar") //The name of the calendar is mandatory. It specifies the "id" attribute of the widget.    .Min(new DateTime(2010, 1, 1, 10, 0, 0)) //Set min time of the calendar    .Max(new DateTime(2010, 1, 1, 20, 0, 0)) //Set min date of the calendar    .Value(DateTime.Now) //Set the value of the calendar)

访问Existing Calendar

通过jQuery.data()引用一个现有日历实例,一旦建议了引用,就可以使用API来控制它的行为。

访问现有日历实例

//Put this after your Kendo Calendar for ASP.NET MVC declaration

处理Kendo UI Calendar事件

通过Kendo UI Calendar可以订阅所有的事件。

WebForms -由处理程序名称订阅

<%: Html.Kendo().Calendar()    .Name("calendar")    .Events(e => e        .Change("calendar_change")        .Navigate("calendar_navigate")    )%>

Razor -由处理程序名称订阅

@(Html.Kendo().Calendar()  .Name("calendar")  .Events(e => e        .Change("calendar_change")        .Navigate("calendar_navigate")  ))

Razor -通过模板委托订阅

@(Html.Kendo().Calendar()  .Name("calendar")  .Events(e => e      .Change(@
function() { //Handle the change event inline }
) .Navigate(@
function() { //Handle the navigate event inline }
) )

点击下载

转载于:https://www.cnblogs.com/elegant-dancer/p/3369682.html

你可能感兴趣的文章
zabbix监控window2008 R2的IIS一些性能监控
查看>>
java基础
查看>>
关于如何调节佳能复试打印机IR3245如何调节打印清晰度方法
查看>>
Linux新手必须学会的12个命令
查看>>
我的友情链接
查看>>
关于NSMutableDictionary setValue:value forKey:key 以及 setobject:value forkey:key 的理解
查看>>
iptables7层过滤,屏蔽(QQ,MSN,迅雷,PPTV等)
查看>>
我的友情链接
查看>>
cacti忘记admin密码
查看>>
MySQL系列之B-1------MySQL安装准备工作
查看>>
安装并配置基于虚拟用户的vsftpd
查看>>
Activity间用Intent和Bundle传递参数
查看>>
使用strace+pstack利器分析程序性能
查看>>
使用 nginx 同域名下部署多个 vue 项目,并使用反向代理
查看>>
[leetcode] 13. Roman to Integer
查看>>
centos7 下载eclipse的镜像站点
查看>>
关于setTimeout & setInterval
查看>>
完整复制/转移数据库
查看>>
Java中JSON字符串与java对象的互换实例详解
查看>>
HDU5152 线段树 + 数论
查看>>