HTML5 Web app開發工具Kendo UI Web教程:如何配置Kendo UI Ca...

    Kendo UI Web包含數百個建立HTML5 web app的必備元素,包括UI組件、數據源、驗證、一個MVVM框架、主題、模板等。本文來看看如何配置Kendo UI Calendar。

一、建立新的操做方法來顯示視圖: javascript

[javascript] view plain copy
  1. public ActionResult Index()  
  2. {  
  3.     return View();  
  4. }  

 

二、添加日曆 html

WebForms java

[javascript] view plain copy
  1. <%: Html.Kendo().Calendar()  
  2.     .Name("calendar"//The name of the calendar is mandatory. It specifies the "id" attribute of the widget.  
  3.     .Min(new DateTime(2010, 1, 1, 10, 0, 0)) //Set min time of the calendar  
  4.     .Max(new DateTime(2010, 1, 1, 20, 0, 0)) //Set min date of the calendar  
  5.     .Value(DateTime.Now) //Set the value of the calendar  
  6. %>  

 

Razor web

[javascript] view plain copy
  1. @(Html.Kendo().Calendar()  
  2.     .Name("calendar"//The name of the calendar is mandatory. It specifies the "id" attribute of the widget.  
  3.     .Min(new DateTime(2010, 1, 1, 10, 0, 0)) //Set min time of the calendar  
  4.     .Max(new DateTime(2010, 1, 1, 20, 0, 0)) //Set min date of the calendar  
  5.     .Value(DateTime.Now) //Set the value of the calendar  
  6. )  


訪問Existing Calendar app

經過jQuery.data()引用一個現有日曆實例,一旦建議了引用,就可使用API來控制它的行爲。 框架

訪問現有日曆實例 spa

>>>示例源碼 .net

處理Kendo UI Calendar事件 orm

經過Kendo UI Calendar能夠訂閱全部的事件。 htm

>>>示例源碼

>>> Kendo UI Web 下載
相關文章
相關標籤/搜索