Kendo UI Web包含數百個建立HTML5 web app的必備元素,包括UI組件、數據源、驗證、一個MVVM框架、主題、模板等。本文來看看如何配置Kendo UI Calendar。
一、建立新的操做方法來顯示視圖: javascript
- public ActionResult Index()
- {
- return View();
- }
二、添加日曆 html
WebForms java
- <%: 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 web
- @(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 app
經過jQuery.data()引用一個現有日曆實例,一旦建議了引用,就可使用API來控制它的行爲。 框架
訪問現有日曆實例 spa
>>>示例源碼 .net
處理Kendo UI Calendar事件 orm
經過Kendo UI Calendar能夠訂閱全部的事件。 htm
>>>示例源碼
>>>
Kendo UI Web
下載