Skip to content

Commit 934537e

Browse files
committed
Sync with Kendo UI Professional
1 parent b1fa261 commit 934537e

File tree

7 files changed

+143
-9
lines changed

7 files changed

+143
-9
lines changed

docs-aspnet/knowledge-base/listbox-move-top-bottom-tools.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Implementing "moveTop" and "moveBottom" Custom Tools
2+
title: Implementing 'moveTop' and 'moveBottom' Custom Tools
33
description: An example on how to create custom tools that move the selected item to the top or the bottom of the options when using the Telerik UI for {{ site.framework }} ListBox.
44
type: how-to
5-
page_title: Implementing "moveTop" and "moveBottom" Custom Tools of the ListBox
5+
page_title: Implementing 'moveTop' and 'moveBottom' Custom Tools of the ListBox
66
slug: listbox-move-top-bottom-tools
77
tags: listbox, custom, tools, moveTop, moveBottom, toolbar, telerik, core, mvc
88
res_type: kb
@@ -23,7 +23,7 @@ res_type: kb
2323

2424
## Description
2525

26-
How can I create custom tools ("moveTop" and "moveBottom") that move the selected option at the top or the bottom of all ListBox options?
26+
How can I create custom tools (*moveTop* and *moveBottom*) that move the selected option at the top or the bottom of all ListBox options?
2727

2828
## Solution
2929

docs/api/javascript/data/gantttask.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ The `id` of the parent task.
286286
end: new Date("2014/6/17 11:00")
287287
});
288288
/* The result can be observed in the DevTools(F12) console of the browser. */
289-
console.log(task.parentId); // outputs "1"
289+
console.log(child.parentId); // outputs "1"
290290
</script>
291291

292292
### percentComplete `String|Number|Object`
@@ -304,7 +304,7 @@ The completion percentage of the task.
304304
end: new Date("2014/6/17 11:00")
305305
});
306306
/* The result can be observed in the DevTools(F12) console of the browser. */
307-
console.log(task.percentComplete); // outputs "0.55"
307+
console.log(parent.percentComplete); // outputs "0.55"
308308
</script>
309309

310310
### start `Date`

docs/api/javascript/data/schedulerdatasource.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,17 @@ If the data source is initialized by the scheduler, its [timezone](/api/javascri
8181

8282
The complete list of the supported timezones is available in the [List of IANA time zones](https://en.wikipedia.org/wiki/List_of_IANA_time_zones) Wikipedia page.
8383

84-
#### Example - configure the data source model model
84+
#### Example - configure the data source model
8585

8686
<script>
87+
// include kendo.timezones.js
88+
var version = kendo.version;
89+
90+
$('<script/>', {
91+
type:'text/javascript',
92+
src:'https://kendo.cdn.telerik.com/'+version+'/js/kendo.timezones.min.js'
93+
}).appendTo('head');
94+
8795
var dataSource = new kendo.data.SchedulerDataSource({
8896
transport: {
8997
read: {

docs/api/javascript/ui/pdfviewer.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,31 @@ Specifies the url to be passed to the pdfjs processor.
118118

119119
### dplProcessing `Object`
120120

121-
Specifies the DPL configuration options.
121+
Specifies the DPL configuration options. For a complete demo and a backend implementation, check the <a href="https://demos.telerik.com/aspnet-core/pdfviewer/dpl-processing" target="_blank">Telerik UI for ASP.NET Core DPL Processing demo</a>.
122+
123+
#### Example
124+
125+
<div id="pdfviewer"></div>
126+
<script>
127+
$("#pdfviewer").kendoPDFViewer({
128+
dplProcessing: {
129+
read: {
130+
url: ""
131+
},
132+
download: {
133+
url: ""
134+
},
135+
upload: {
136+
url: ""
137+
}
138+
},
139+
toolbar: {
140+
items: [
141+
"pager", "spacer", "open", "download"
142+
]
143+
}
144+
});
145+
</script>
122146

123147
### dplProcessing.read `Object`
124148

docs/api/javascript/ui/treeview.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ If provided, the node that should be selected.
13471347

13481348
`jQuery` The currently selected node.
13491349

1350-
#### Example
1350+
#### Example - select a node by passing an element
13511351

13521352
<div id="treeview"></div>
13531353
<script>
@@ -1370,6 +1370,46 @@ If provided, the node that should be selected.
13701370
treeview.select($()); // clears selection
13711371
</script>
13721372

1373+
#### Example - select a node by passing a jQuery selector
1374+
1375+
<div id="treeview"></div>
1376+
<script>
1377+
$("#treeview").kendoTreeView({
1378+
dataSource: [
1379+
{ text: "foo", items: [
1380+
{ text: "bar" }
1381+
] }
1382+
]
1383+
});
1384+
1385+
var treeview = $("#treeview").data("kendoTreeView");
1386+
treeview.select($(".k-treeview-item").last());
1387+
1388+
/* The result can be observed in the DevTools(F12) console of the browser. */
1389+
console.log(treeview.text(treeview.select())); // logs "bar"
1390+
1391+
</script>
1392+
1393+
#### Example - select a node by passing a string
1394+
1395+
<div id="treeview"></div>
1396+
<script>
1397+
$("#treeview").kendoTreeView({
1398+
dataSource: [
1399+
{ text: "foo", items: [
1400+
{ text: "bar" }
1401+
] }
1402+
]
1403+
});
1404+
1405+
var treeview = $("#treeview").data("kendoTreeView");
1406+
treeview.select(".k-treeview-item:last");
1407+
1408+
/* The result can be observed in the DevTools(F12) console of the browser. */
1409+
console.log(treeview.text(treeview.select())); // logs "bar"
1410+
1411+
</script>
1412+
13731413
### setDataSource
13741414

13751415
Sets and binds a dataSource to the widget.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: Customizing DateRangePicker Behavior in Kendo UI
3+
description: Learn how to modify the DateRangePicker control behavior to update start and end date selections accurately.
4+
type: how-to
5+
page_title: How to Customize DateRangePicker Selection Behavior
6+
slug: daterangepicker-customize-behavior
7+
tags: kendo ui, daterangepicker, custom behavior, date selection
8+
res_type: kb
9+
---
10+
11+
## Description
12+
When using the [DateRangePicker](https://docs.telerik.com/kendo-ui/api/javascript/ui/daterangepicker) control, selecting an end date updates the start date field instead of the end date field. The goal is to ensure that when either the start or end date is selected, the corresponding field updates accurately, providing a seamless user experience.
13+
14+
This KB article also answers the following question:
15+
- What code changes are required to update the start and end dates correctly in DateRangePicker?
16+
17+
## Solution
18+
To achieve the desired behavior, implement custom logic using the [`change`](https://docs.telerik.com/kendo-ui/api/javascript/ui/daterangepicker/events/change) and [`open`](https://docs.telerik.com/kendo-ui/api/javascript/ui/daterangepicker/events/open) events of the DateRangePicker. This solution involves tracking the selected start and end dates and updating them based on user interactions.
19+
20+
1. **Initialize the DateRangePicker and define custom logic:**
21+
22+
```javascript
23+
$(document).ready(function() {
24+
var savedRange = {};
25+
26+
$("#daterangepicker").kendoDateRangePicker({
27+
change: function() {
28+
var range = this.range();
29+
30+
if (!savedRange.start && range.start) {
31+
savedRange.start = range.start;
32+
}
33+
34+
if (range.start && range.end) {
35+
savedRange = range;
36+
} else if (range.start) {
37+
var newDate = range.start;
38+
39+
if (newDate > savedRange.start) {
40+
savedRange.end = newDate;
41+
} else {
42+
savedRange = { start: newDate, end: null };
43+
}
44+
}
45+
this.range(savedRange);
46+
},
47+
open: function() {
48+
if (savedRange.start || savedRange.end) {
49+
this.range(savedRange);
50+
}
51+
}
52+
});
53+
});
54+
```
55+
2. **Test the behavior with a dojo example:**
56+
57+
Visit the dojo example at [https://dojo.telerik.com/NShpKjFe](https://dojo.telerik.com/NShpKjFe) to see the custom behavior in action.
58+
59+
## See Also
60+
- [DateRangePicker Change Event Documentation](https://docs.telerik.com/kendo-ui/api/javascript/ui/daterangepicker/events/change)
61+
- [DateRangePicker Open Event Documentation](https://docs.telerik.com/kendo-ui/api/javascript/ui/daterangepicker/events/open)
62+
- [Official Kendo UI DateRangePicker Documentation](https://docs.telerik.com/kendo-ui/controls/editors/daterangepicker/overview)

docs/knowledge-base/use-custom-action-icons.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ How can I use custom icons for the action buttons of a Kendo UI for jQuery Windo
3939

4040
To achieve the desired scenario, use any of the following approaches:
4141

42-
* Use some of the [built-in Kendo UI icons, which are part of the theme sprite](https://demos.telerik.com/kendo-ui/styling/icons). Note that you can only use the `"normal"` icons that work with a `k-i-...` CSS class.
42+
* Use some of the [built-in Kendo UI icons, which are part of the theme sprite](https://docs.telerik.com/kendo-ui/styles-and-layout/sass-themes/font-icons#list-of-font-icons). Note that you can only use the `"normal"` icons that work with a `k-i-...` CSS class.
4343
* Use a custom icon, which is not provided by or related to Kendo UI.
4444

4545
The example below demonstrates the two options of how to use custom icons for the action buttons of a Kendo UI Window. Note that the custom Window action name takes part in the generated CSS class of the icon's `span` element in the Window title bar. For example, an action name `abc` is going to generate a `span.k-i-abc` element in the title bar. When using Kendo UI icons, there is no need to write additional CSS code. When using non-Kendo UI icons, custom CSS is required, so that the generated CSS class is assigned the desired background image.

0 commit comments

Comments
 (0)