Skip to content

Commit e948ca8

Browse files
author
User Jenkins
committed
Sync with Kendo UI Professional
1 parent 0ca7870 commit e948ca8

File tree

7 files changed

+759
-4
lines changed

7 files changed

+759
-4
lines changed

docs-aspnet/_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,10 +634,10 @@ navigation:
634634
baseurl: /aspnet-core
635635

636636
## The Kendo UI version used
637-
cdnVersion: "2021.2.511"
637+
cdnVersion: "2021.2.616"
638638

639639
## The MVC Core version used
640-
mvcCoreVersion: "2021.2.511"
640+
mvcCoreVersion: "2021.2.616"
641641

642642
ff-sheet-id: 1mottKpkbJFxkUq6rS3CsPrT8JQOE2JlUtsJBR622cxs
643643

docs/_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,10 +718,10 @@ navigation:
718718
baseurl: /kendo-ui
719719

720720
## The Kendo UI version used
721-
cdnVersion: "2021.2.511"
721+
cdnVersion: "2021.2.616"
722722

723723
## The MVC Core version used
724-
mvcCoreVersion: "2021.2.511"
724+
mvcCoreVersion: "2021.2.616"
725725

726726
## Progress NPM Registry
727727
registry_url: 'https://registry.npm.telerik.com/'

docs/backwards-compatibility/2021-backward-compatibility.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ position: 1
1010

1111
This article lists the breaking or important changes in the 2021 releases of Kendo UI.
1212

13+
## Kendo UI 2021 R2 SP1
14+
15+
> Important change
16+
17+
**TileLayout**
18+
19+
The TileLayout container headers come with a new rendering. The TileLayout containers no longer render the header texts inside `<h5>` elements, but place them inside `<div>` elements.
20+
1321
## Kendo UI 2021 R2
1422

1523
> Important change
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Add an icon in the DropDownList placeholder
3+
description: An example on how to Add an icon in the DropDownList placeholder.
4+
type: how-to
5+
page_title: Add an icon in the DropDownList placeholder | Kendo UI DropDownList for jQuery
6+
slug: dropdownlist-add-icon-placeholder
7+
tags: kendoui, kendo, dropdownlist, icon, placeholder
8+
res_type: kb
9+
component: dropdownlist
10+
---
11+
12+
## Environment
13+
14+
<table>
15+
<tr>
16+
<td>Product</td>
17+
<td>Progress Kendo UI DropDownList</td>
18+
</tr>
19+
</table>
20+
21+
## Description
22+
23+
How can I add an icon in the DropDownList placeholder?
24+
25+
## Solution
26+
27+
```dojo
28+
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
29+
<input id="dropdownlist" />
30+
<script>
31+
$("#dropdownlist").kendoDropDownList({
32+
dataSource: [
33+
{ productName: "Product 1", productId: 1 },
34+
{ productName: "Product 2", productId: 2 }
35+
],
36+
dataTextField: "productName",
37+
dataValueField: "productId",
38+
optionLabel: {
39+
productName: "Select a product...",
40+
productId: ""
41+
},
42+
optionLabelTemplate: "<span class='k-icon k-i-twitter'></span>"
43+
});
44+
</script>
45+
```
46+
47+
## See Also
48+
49+
* [API Reference of the DropDownList](https://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist)
Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
---
2+
title: Prevent invalid start/end date values in the Scheduler popup editor.
3+
description: An example on how to prevent the user from entering invalid start/end date values in the Kendo jQuery Scheduler popup editor.
4+
type: how-to
5+
page_title: Prevent invalid start/end date values in the Scheduler popup editor | Kendo UI Scheduler for jQuery
6+
slug: scheduler-start-end-invalid-input
7+
tags: scheduler, start, end, inputs, readonly, datepickers
8+
res_type: kb
9+
component: scheduler
10+
---
11+
12+
## Environment
13+
14+
<table>
15+
<tr>
16+
<td>Product</td>
17+
<td>Progress Kendo UI Scheduler</td>
18+
</tr>
19+
<tr>
20+
<td>Kendo UI for jQuery</td>
21+
<td>2021.2.511</td>
22+
</tr>
23+
</table>
24+
25+
## Description
26+
27+
How can I prevent invalid start/end date values in the Scheduler popup editor, like typing irrelevant text in the inputs?
28+
29+
## Solution #1
30+
31+
Handle the [edit event](api/javascript/ui/scheduler/events/edit) and add "readonly" property to the start and end inputs.
32+
33+
```dojo
34+
<div id="example">
35+
<div id="scheduler"></div>
36+
</div>
37+
<script>
38+
$(function() {
39+
function scheduler_edit(e) {
40+
// Make Start and End DateTimePickers INPUTS readonly, allowing date selection only through dropdowns
41+
42+
$("[name='start']").prop("readonly", true);
43+
$("[name='end']").prop("readonly", true);
44+
}
45+
46+
$("#scheduler").kendoScheduler({
47+
date: new Date("2013/6/13"),
48+
startTime: new Date("2013/6/13 7:00"),
49+
height: 400,
50+
timezone: "Etc/UTC",
51+
views: [
52+
"day",
53+
{ type: "week", selected: true },
54+
"month",
55+
"agenda",
56+
"timeline"
57+
],
58+
selectable: true,
59+
edit: scheduler_edit,
60+
dataSource: {
61+
batch: true,
62+
transport: {
63+
read: {
64+
url: "https://demos.telerik.com/kendo-ui/service/tasks",
65+
dataType: "jsonp"
66+
},
67+
update: {
68+
url: "https://demos.telerik.com/kendo-ui/service/tasks/update",
69+
dataType: "jsonp"
70+
},
71+
create: {
72+
url: "https://demos.telerik.com/kendo-ui/service/tasks/create",
73+
dataType: "jsonp"
74+
},
75+
destroy: {
76+
url: "https://demos.telerik.com/kendo-ui/service/tasks/destroy",
77+
dataType: "jsonp"
78+
},
79+
parameterMap: function(options, operation) {
80+
if (operation !== "read" && options.models) {
81+
return {models: kendo.stringify(options.models)};
82+
}
83+
}
84+
},
85+
schema: {
86+
model: {
87+
id: "taskID",
88+
fields: {
89+
taskID: { from: "TaskID", type: "number" },
90+
title: { from: "Title", defaultValue: "No title", validation: { required: true } },
91+
start: { type: "date", from: "Start" },
92+
end: { type: "date", from: "End" },
93+
startTimezone: { from: "StartTimezone" },
94+
endTimezone: { from: "EndTimezone" },
95+
description: { from: "Description" },
96+
recurrenceId: { from: "RecurrenceID" },
97+
recurrenceRule: { from: "RecurrenceRule" },
98+
recurrenceException: { from: "RecurrenceException" },
99+
ownerId: { from: "OwnerID", defaultValue: 1 },
100+
isAllDay: { type: "boolean", from: "IsAllDay" }
101+
}
102+
}
103+
}
104+
}
105+
});
106+
});
107+
</script>
108+
```
109+
110+
## Solution #2
111+
112+
Handle the edit event and force the Start/End DatePickers to reject invalid dates format and preserve the last valid date entered
113+
114+
```dojo
115+
<div id="example">
116+
<div id="scheduler"></div>
117+
</div>
118+
<script>
119+
$(function() {
120+
121+
function eventEdit() {
122+
var startPicker = $("[data-container-for=start] input[name=start]").data("kendoDateTimePicker");
123+
var startValue = startPicker.value();
124+
125+
startPicker.setOptions({
126+
change: function(e) {
127+
var date = startPicker.value();
128+
if (!date) {
129+
startPicker.value(startValue);
130+
}
131+
}
132+
})
133+
134+
var endPicker = $("[data-container-for=end] input[name=end]").data("kendoDateTimePicker");
135+
var endValue = endPicker.value();
136+
137+
endPicker.setOptions({
138+
change: function(e) {
139+
var date = endPicker.value();
140+
if (!date) {
141+
endPicker.value(endValue);
142+
}
143+
}
144+
})
145+
146+
}
147+
148+
$("#scheduler").kendoScheduler({
149+
date: new Date("2013/6/13"),
150+
startTime: new Date("2013/6/13 7:00"),
151+
height: 400,
152+
timezone: "Etc/UTC",
153+
edit: eventEdit,
154+
views: [
155+
"day",
156+
{ type: "week", selected: true },
157+
"month",
158+
"agenda",
159+
"timeline"
160+
],
161+
selectable: true,
162+
change: function (e) {
163+
console.log('change', e)
164+
},
165+
dataSource: {
166+
batch: true,
167+
transport: {
168+
read: {
169+
url: "https://demos.telerik.com/kendo-ui/service/tasks",
170+
dataType: "jsonp"
171+
},
172+
update: {
173+
url: "https://demos.telerik.com/kendo-ui/service/tasks/update",
174+
dataType: "jsonp"
175+
},
176+
create: {
177+
url: "https://demos.telerik.com/kendo-ui/service/tasks/create",
178+
dataType: "jsonp"
179+
},
180+
destroy: {
181+
url: "https://demos.telerik.com/kendo-ui/service/tasks/destroy",
182+
dataType: "jsonp"
183+
},
184+
parameterMap: function (options, operation) {
185+
if (operation !== "read" && options.models) {
186+
return { models: kendo.stringify(options.models) };
187+
}
188+
}
189+
},
190+
schema: {
191+
model: {
192+
id: "taskID",
193+
fields: {
194+
taskID: { from: "TaskID", type: "number" },
195+
title: { from: "Title", defaultValue: "No title", validation: { required: true } },
196+
start: { type: "date", from: "Start" },
197+
end: { type: "date", from: "End" },
198+
startTimezone: { from: "StartTimezone" },
199+
endTimezone: { from: "EndTimezone" },
200+
description: { from: "Description" },
201+
recurrenceId: { from: "RecurrenceID" },
202+
recurrenceRule: { from: "RecurrenceRule" },
203+
recurrenceException: { from: "RecurrenceException" },
204+
ownerId: { from: "OwnerID", defaultValue: 1 },
205+
isAllDay: { type: "boolean", from: "IsAllDay" }
206+
}
207+
}
208+
}
209+
}
210+
});
211+
});
212+
</script>
213+
```

0 commit comments

Comments
 (0)