Skip to content

Commit fecfd35

Browse files
committed
Sync with Kendo UI Professional
1 parent 83b5a8d commit fecfd35

26 files changed

+1177
-95
lines changed

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# jQuery Docs owners
22
/docs/ @NikoPenev21 @nelito987 @martintabakov
33
# MVC/Core Docs owners
4-
/docs-aspnet/ @eyupyusein @alestoya @yanisslav @aleksandarevangelatov @StoyanGoranov @mihaela-lukanova @antonmironovv @VicTachev @IvanDanchev
4+
/docs-aspnet/ @eyupyusein @alestoya @aleksandarevangelatov @mihaela-lukanova @antonmironovv @VicTachev @IvanDanchev
55
# Source owners
66
/src/ @Iankodj @ag-petrov @pepinho24 @gdenchevprog @iordanGrancharov
77
/tests/ @Iankodj @ag-petrov @pepinho24 @gdenchevprog @iordanGrancharov

docs-aspnet/html-helpers/data-management/grid/columns/resizing.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The resizing behavior of the Grid columns depends on whether scrolling is enable
1212

1313
For a runnable example, refer to the [demo on resizing columns in the Grid](https://demos.telerik.com/{{ site.platform }}/grid/column-resizing).
1414

15-
When scrolling is disabled and a Grid column is resized, other columns change widths too, so that the sum of all column widths remains constant. If both the columns and the Grid `<div>` already have their minimum possible widths applied, then the resizing of the columns stops working. In such scenarios, use either of the following approaches:
15+
When scrolling is disabled and a Grid column is resized, other columns change widths too, including the ones with `Resizable` configuration options set to `false`, so that the sum of all column widths remains constant. If both the columns and the Grid `<div>` already have their minimum possible widths applied, then the resizing of the columns stops working. In such scenarios, use either of the following approaches:
1616
* Apply a larger width to the Grid, or
1717
* Enable scrolling.
1818

@@ -21,6 +21,45 @@ When scrolling is enabled and a column is resized, all other columns maintain th
2121
* If the sum of all column widths is equal to the width of the Grid, no horizontal scrollbar appears.
2222
* If the sum of all column widths is less than the width of the Grid, an empty space after the last column appears.
2323

24+
The `2024 Q2` release introduces a `Resizable` configuration option that allows you to disable resizing for specific columns.
25+
26+
The example below demonstrates how to disable resizing for the `ShipCity` column:
27+
28+
```HtmlHelper
29+
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()
30+
.Name("grid")
31+
.Scrollable()
32+
.Resizable(resize => resize.Columns(true))
33+
.Columns(columns =>
34+
{
35+
columns.Bound(o => o.OrderDate).Width(110).Format("{0:MM/dd/yyyy}");
36+
columns.Bound(o => o.ShipCountry).Width(110).MinResizableWidth(100);
37+
columns.Bound(o => o.ShipCity).Resizable(false).Width(110);
38+
columns.Bound(o => o.ShipName).Width(200);
39+
columns.Bound(o => o.ShipAddress).Format("{0:MM/dd/yyyy}");
40+
columns.Bound(o => o.OrderID).Width(60);
41+
})
42+
)
43+
44+
```
45+
{% if site.core %}
46+
```TagHelper
47+
@addTagHelper *, Kendo.Mvc
48+
49+
<kendo-grid name="grid" resizable="true">
50+
<scrollable enabled="true"/>
51+
<columns>
52+
<column field="OrderDate" width="110" format="{0:MM/dd/yyyy}"/>
53+
<column field="ShipCountry" width="110" min-resizable-width="100"/>
54+
<column field="ShipCity" resizable="false" width="110"/>
55+
<column field="ShipName" width="200"/>
56+
<column field="ShipAddress"/>
57+
<column field="OrderID" width="60"/>
58+
</columns>
59+
</kendo-grid>
60+
```
61+
{% endif %}
62+
2463
By design, the last column of the Grid has no right border, so that no double border appears at the right end of the Grid if the Grid table width matches the Grid width. If needed, you can apply a right border with the CSS code from the following example. The color value of the `#ccc` border has to match the color of the cell border from the Kendo UI theme. To obtain this, check the styles of the table cell by using a DOM inspector.
2564

2665
.k-grid-header-wrap > table,

docs/api/javascript/ui/calendar.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,38 @@ Represents the Kendo UI Calendar widget. Inherits from [Widget](/api/javascript/
1212

1313
## Configuration
1414

15+
### allowReverse `Boolean` *(default: false)*
16+
17+
Enables the user to select an end date that is before the start date. This option is available only when the [`selectable`](/api/javascript/ui/calendar/configuration/selectable) configuration is set to **range**.
18+
19+
#### Example - enable reverse selection
20+
21+
<div id="calendar"></div>
22+
<script>
23+
$("#calendar").kendoCalendar({
24+
selectable: "range",
25+
allowReverse: true,
26+
showOtherMonthDays: false
27+
});
28+
</script>
29+
30+
### centuryCellsFormat `String`*(default: "long")*
31+
32+
Specifies the format of the century cells.
33+
34+
* `"long"` - The cells will display a decade range **2000-2009**, **2010-2019**.
35+
* `"short"` - The cells will display just the starting year of the decade **2000**, **2010**.
36+
37+
#### Example - render the short version of the century cells
38+
39+
<div id="calendar"></div>
40+
<script>
41+
$("#calendar").kendoCalendar({
42+
centuryCellsFormat: "short",
43+
start: "century"
44+
});
45+
</script>
46+
1547
### componentType `String`*(default: "classic")*
1648

1749
Specifies the component type of the widget.
@@ -410,7 +442,7 @@ Allows customization of the text of the Today button present in the widget in it
410442

411443
### selectable `String` *(default: "single")*
412444

413-
By default user is able to select a single date. The property can also be set to "multiple" in order the multiple date selection to be enabled. More information about multiple selection can be found in the [Selection]({% slug overview_kendoui_calendar_widget %}#selection) article.
445+
By default user is able to select a single date. The property can also be set to **multiple** or **range**. More information about the different selection modes can be found in the [Selection]({% slug overview_kendoui_calendar_widget %}#selection) article.
414446

415447
#### Example - enable the multiple selection
416448

@@ -485,6 +517,35 @@ The following settings are available for the **start** value:
485517
});
486518
</script>
487519

520+
### range `Object`*(default: { start: null, end: null })*
521+
522+
Specifies an initial range selection. This option is available only when the [`selectable`](/api/javascript/ui/calendar/configuration/selectable) configuration is set to `range`.
523+
524+
#### Example - specify the selected range of the component
525+
526+
<div id="calendar"></div>
527+
<script>
528+
$("#calendar").kendoCalendar({
529+
selectable: "range",
530+
range: { start: new Date(2024, 3, 3), end: new Date(2024, 3, 13) }
531+
});
532+
</script>
533+
534+
### showOtherMonthDays `Boolean`*(default: true)*
535+
536+
When this configuration is enabled, the calendar will render days from the previous and next months in the current view.
537+
538+
> The `showOtherMonthDays` configuration is not compatible with the [`range`](/api/javascript/ui/calendar/configuration/selectable) selection. It is advised that this property is set to **false** when `selectable` is set to **range**.
539+
540+
#### Example - Hide dates from the other months
541+
542+
<div id="calendar"></div>
543+
<script>
544+
$("#calendar").kendoCalendar({
545+
showOtherMonthDays: false
546+
});
547+
</script>
548+
488549
## Methods
489550

490551
### current

docs/api/javascript/ui/daterangepicker.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,32 @@ Represents the Kendo UI DateRangePicker widget. Inherits from [Widget](/api/java
1111

1212
## Configuration
1313

14+
### allowReverse `Boolean` *(default: false)*
15+
16+
Enables the user to select an end date that is before the start date.
17+
18+
#### Example - enable reverse selection
19+
20+
<div id="daterangepicker"></div>
21+
<script>
22+
$("#daterangepicker").kendoDateRangePicker({
23+
allowReverse: true
24+
});
25+
</script>
26+
27+
### autoClose `Boolean` *(default: true)*
28+
29+
Specifies whether the calendar popup should close automatically when a range is selected.
30+
31+
#### Example - prevent the popup closure
32+
33+
<div id="daterangepicker"></div>
34+
<script>
35+
$("#daterangepicker").kendoDateRangePicker({
36+
autoClose: false
37+
});
38+
</script>
39+
1440
### adaptiveMode `String`*(default: "none")*
1541

1642
Specifies the adaptive rendering of the component. The supported values are: `none` *(default)*, `auto`.
@@ -32,6 +58,32 @@ Specifies the adaptive rendering of the component. The supported values are: `no
3258
});
3359
</script>
3460

61+
### calendarButton `Boolean` *(default: false)*
62+
63+
If this configuration is enabled, a calendar button will appear inside the date inputs. This is similar to the calendar button in the DatePicker component. The calendar popup will be opened only when the button is clicked. Clicking inside the input itself will have no effect.
64+
65+
#### Example - render the calendar buttons
66+
67+
<div id="daterangepicker"></div>
68+
<script>
69+
$("#daterangepicker").kendoDateRangePicker({
70+
calendarButton: true
71+
});
72+
</script>
73+
74+
### clearButton `Boolean` *(default: false)*
75+
76+
If this configuration is enabled, a clear button will appear in the date inputs where a date is selected. Clicking on the clear button will remove the selected date from the input.
77+
78+
#### Example - render the clear button
79+
80+
<div id="daterangepicker"></div>
81+
<script>
82+
$("#daterangepicker").kendoDateRangePicker({
83+
clearButton: true
84+
});
85+
</script>
86+
3587
### culture `String`*(default: "en-US")*
3688

3789
Specifies the culture info used by the widget.

docs/api/javascript/ui/multiviewcalendar.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,37 @@ Represents the Kendo UI MultiViewCalendar widget. Inherits from [Widget](/api/ja
1212

1313
## Configuration
1414

15+
### allowReverse `Boolean` *(default: false)*
16+
17+
Enables the user to select an end date that is before the start date. This option is available only when the [`selectable`](/api/javascript/ui/multiviewcalendar/configuration/selectable) configuration is set to **range**.
18+
19+
#### Example - enable reverse selection
20+
21+
<div id="multiViewCalendar"></div>
22+
<script>
23+
$("#multiViewCalendar").kendoMultiViewCalendar({
24+
selectable: "range",
25+
allowReverse: true
26+
});
27+
</script>
28+
29+
### centuryCellsFormat `String`*(default: "long")*
30+
31+
Specifies the format of the century cells.
32+
33+
* `"long"` - The cells will display a decade range **2000-2009**, **2010-2019**.
34+
* `"short"` - The cells will display just the starting year of the decade **2000**, **2010**.
35+
36+
#### Example - render the short version of the century cells
37+
38+
<div id="multiViewCalendar"></div>
39+
<script>
40+
$("#multiViewCalendar").kendoMultiViewCalendar({
41+
centuryCellsFormat: "short",
42+
start: "century"
43+
});
44+
</script>
45+
1546
### culture `String`*(default: "en-US")*
1647

1748
Specifies the culture info used by the widget.
@@ -442,6 +473,21 @@ The following settings are available for the **start** value:
442473
});
443474
</script>
444475

476+
### showOtherMonthDays `Boolean`*(default: false)*
477+
478+
When this configuration is enabled, the MultiViewCalendar will render days from the previous and next months in the current views.
479+
480+
> The `showOtherMonthDays` configuration is not compatible with the [`range`](/api/javascript/ui/multiviewcalendar/configuration/selectable) selection. It is advised that this property is set to **false** when `selectable` is set to **range**.
481+
482+
#### Example - Show dates from the other months
483+
484+
<div id="multiViewCalendar"></div>
485+
<script>
486+
$("#multiViewCalendar").kendoCalendar({
487+
showOtherMonthDays: true
488+
});
489+
</script>
490+
445491
## Methods
446492

447493
### current
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Calendar Century Cells Format
3+
page_title: jQuery Calendar Documentation - Calendar Century Cells Format
4+
description: "Learn the possible formats for the century cells in the Kendo for jQuery Calendar."
5+
slug: century_cells_format_calendar
6+
position: 9
7+
---
8+
9+
# Century Cells Format
10+
11+
As of R2 2024 version of the Kendo UI suite, the Calendar component on option to choose from two formats for the century cells in the Calendar century view. The default value of the [`centuryCellsFormat`](/api/javascript/ui/calendar/configuration/centurycellsformat) configuration is `long` which causes the cells to render like "2010-2019". The below example shows how you can change the format to display only the starting year of the decade.
12+
13+
```dojo
14+
<div id="calendar"></div>
15+
<script>
16+
$("#calendar").kendoCalendar({
17+
centuryCellsFormat: "short",
18+
start: "century"
19+
});
20+
</script>
21+
```
22+
23+
24+
## See Also
25+
26+
* [Century Cells Format Demo of the Calendar](https://demos.telerik.com/kendo-ui/calendar/century-cells-format)
27+
* [JavaScript API Reference of the Calendar](/api/javascript/ui/calendar)

docs/controls/calendar/component-type.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Calendar Component Types
3-
page_title: jQuery DatePicker Documentation - Calendar Component Types
4-
description: "Get started with the jQuery DatePicker by Kendo UI and learn how to enable the modern component type."
3+
page_title: jQuery Calendar Documentation - Calendar Component Types
4+
description: "Get started with the jQuery Calendar by Kendo UI and learn how to enable the modern component type."
55
slug: componenttypes_calendar
66
position: 8
77
---

docs/controls/calendar/overview.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ The component also supports custom templates for its Month view and configuratio
2222
* [Day template]({% slug daytemplate_kendoui_calendar %})&#8211;You can modify the appearance of one or more Calendar days.
2323
* [Week numbers]({% slug weeknum_kendoui_calendar %})&#8211;The Calendar also enables you to showcase the week number.
2424
* [Selection]({% slug selection_kendoui_calendar %})&#8211;You can also enable the user to select one or more Calendar dates.
25+
* [Century Cells Format]({% slug century_cells_format_calendar %})&mdash;The component exposes two formats for the century cells.
26+
* [Reverse Selection]({% slug reverse_selection_calendar %})&mdash;The component allows you to pick an end date which is before the start date.
27+
* [Show Other Month Days]({% slug other_month_days_calendar %})&mdash;The component allows you to pick an end date which is before the start date.
2528
* [Accessibility]({% slug accessibility_calendar %})&#8211;The Calendar is accessible for screen readers, supports WAI-ARIA attributes, and delivers keyboard shortcuts for faster navigation.
2629

2730
## Next Steps
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Calendar Reverse Selection
3+
page_title: jQuery Calendar Documentation - Calendar Reverse Selection
4+
description: "Check the reverse selection feature in the Kendo for jQuery Calendar."
5+
slug: reverse_selection_calendar
6+
position: 10
7+
---
8+
9+
# Reverse Selection
10+
11+
As of R2 2024 version of the Kendo UI suite, the Calendar provides an [`allowReverse`](/api/javascript/ui/calendar/configuration/allowreverse) selection. It allows you to pick an end date which is before the selected start date when the [`selectable`](/api/javascript/ui/calendar/configuration/selectable) option is set to `range`.
12+
13+
```dojo
14+
<div id="calendar"></div>
15+
<script>
16+
$("#calendar").kendoCalendar({
17+
selectable: "range",
18+
allowReverse: true,
19+
showOtherMonthDays:false
20+
});
21+
</script>
22+
```
23+
> When range selection is configured, the [`showOtherMonthDays`](/api/javascript/ui/calendar/configuration/showothermonthdays) needs to be set to `false`.
24+
25+
## See Also
26+
27+
* [Reverse Selection Demo of the Calendar](https://demos.telerik.com/kendo-ui/calendar/reverse-selection)
28+
* [JavaScript API Reference of the Calendar](/api/javascript/ui/calendar)

docs/controls/calendar/selection.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ To perform the multiple date selection, the user can also use the keyboard:
3030
<div id="calendar"></div>
3131
<script>
3232
$("#calendar").kendoCalendar({
33-
selectable: "multiple"
34-
});
33+
selectable: "multiple"
34+
});
3535
</script>
3636
```
3737

@@ -41,9 +41,9 @@ The following image demonstrates a Calendar with selected multiple dates.
4141

4242
## Range Date Selection
4343

44-
The Calendar enables the range date selection over the keyboard.
44+
The Calendar enables the range date selection over the keyboard. As of R2 2024 release, the component supports `range` selection through the [`selectable`](/api/javascript/ui/calendar/configuration/selectable) option.
4545

46-
The usage of the `Shift` key allows the user to select a range of dates in the same month or across different months:
46+
The usage of the `Shift` key allows the user to select a range of dates in the same month or across different months when the [`selectable`](/api/javascript/ui/calendar/configuration/selectable) configuration is set to `multiple`:
4747

4848
* `Shift` + mouse-clicking specific dates&mdash;Selects all dates between the most recently selected one (with `Space` or mouse click) and the clicked cell.
4949
* `Shift` + mouse clicking specific dates&mdash;If no previous selection was made, selects all dates from the beginning to the clicked cell.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Calendar Other Month Days
3+
page_title: jQuery Calendar Documentation - Calendar Other Month Days
4+
description: "Learn how you can show or hide the days from the previous and next months in the Kendo for jQuery Calendar."
5+
slug: other_month_days_calendar
6+
position: 11
7+
---
8+
9+
# Other Month Days
10+
11+
As of R2 2024 version of the Kendo UI suite, the Calendar exposes the [`showOtherMonthDays`](/api/javascript/ui/calendar/configuration/showothermonthdays) option, which allows you to control whether the days from the previous/next months will be displayed.
12+
13+
```dojo
14+
<div id="calendar"></div>
15+
<script>
16+
$("#calendar").kendoCalendar({
17+
showOtherMonthDays:false
18+
});
19+
</script>
20+
```
21+
22+
## See Also
23+
24+
* [Show Other Month Days Demo of the Calendar](https://demos.telerik.com/kendo-ui/calendar/show-other-month-days)
25+
* [JavaScript API Reference of the Calendar](/api/javascript/ui/calendar)

0 commit comments

Comments
 (0)