As per the subject, you can no longer use the Calendar to select a date in a month before the currently selected Date. Please see the following demo:
https://stackblitz.com/edit/react-xc2oxm-wgsfhy?file=app%2Fmain.tsx
Steps to reproduce:
This error is not observed if you:
We aren't certain but don't believe this error was present before the latest Chrome 113 update. The error is reproducible in all versions of KendoReact from 5.2.0 onwards.
In the following example:
https://stackblitz.com/edit/react-l3bszd?file=app%2Fmain.tsx
We have 2 events associated with 2 different resource items (in this case people - Peter and Alex). If we have only 1 resource item defined (e.g. Peter) we also see Alex's event in Peter's calendar group (column) which is incorrect.
However, as long as we have more than 1 resource item provided, grouping is done correctly (commented lines 21-23):
My suspicion is that grouping was never tested with only 1 resource item, as it doesn't make much sense to group in that case. However, those groups also act as filters for events that do not have associated resource. We let our users to dynamically multi-select from a list of all available resource items so that they will see their events grouped only for the specified resource items. And if they select only 1 resource item from that list, they will see all events (for other resource items as well) incorrectly.
In our unit tests, we sometimes want to be able to use the ByTestId methods of the React Testing Library to find bits of DOM created by a Kendo component. However, setting a data-testid attribute (or really any data- attribute) on a Kendo component does not always result in the attribute appearing anywhere in the final DOM.
To demonstrate, below is a test suite (also included in the zip) where I tried putting a data-testid attribute on the Kendo components Input, TextArea, Checkbox, Slider, SliderLabel, MultiSelect, and DatePicker, then checked if the attribute appeared in the rendered DOM. The tests for Input, TextArea, and Checkbox are successful. The ones for Slider, SliderLabel, MultiSelect, and DatePicker are not.
import { render, screen } from '@testing-library/react';
import { Input, TextArea, Checkbox, Slider, SliderLabel } from '@progress/kendo-react-inputs';
import { MultiSelect } from '@progress/kendo-react-dropdowns';
import { DatePicker } from '@progress/kendo-react-dateinputs';
// SUCCEEDS
describe('Kendo Input', () => {
it('supports data attributes', () => {
render(
<Input data-testid="the-input" />
);
const input = screen.queryByTestId('the-input');
expect(input).toBeTruthy();
});
});
// SUCCEEDS
describe('Kendo TextArea', () => {
it('supports data attributes', () => {
render(
<TextArea data-testid="the-text-area" />
);
const textarea = screen.queryByTestId('the-text-area');
expect(textarea).toBeTruthy();
});
});
// SUCCEEDS
describe('Kendo Checkbox', () => {
it('supports data attributes', () => {
render(
<Checkbox label={"Chad"} data-testid="the-checkbox" />
);
const checkbox = screen.queryByTestId('the-checkbox');
expect(checkbox).toBeTruthy();
});
});
// FAILS
describe('Kendo Slider & SliderLabel', () => {
it('supports data attributes', () => {
render(
<Slider min={1} max={2} data-testid="slider-root">
<SliderLabel position={1} data-testid="slider-label-1">One Fish</SliderLabel>
<SliderLabel position={2} data-testid="slider-label-2">Two Fish</SliderLabel>
</Slider>
);
const sliderRoot = screen.queryByTestId('slider-root');
const sliderLabel1 = screen.queryByTestId('slider-label-1');
const sliderLabel2 = screen.queryByTestId('slider-label-2');
// test them all at once so we can know the full scope of our failure/success
expect({
sliderRoot,
sliderLabel1,
sliderLabel2
}).toMatchObject({
sliderRoot: expect.anything(), // don't be null or undefined
sliderLabel1: expect.anything(), // don't be null or undefined
sliderLabel2: expect.anything() // don't be null or undefined
});
});
});
// FAILS
describe('Kendo MultiSelect', () => {
it('supports data attributes', () => {
render(
<MultiSelect data-testid="the-multi-select" />
);
const multiselect = screen.queryByTestId('the-multi-select');
expect(multiselect).toBeTruthy();
});
});
// FAILS
describe('Kendo DatePicker', () => {
it('supports data attributes', () => {
render(
<DatePicker data-testid="the-date-picker" />
);
const datepicker = screen.queryByTestId('the-date-picker');
expect(datepicker).toBeTruthy();
});
});
https://codesandbox.io/s/keen-panka-vctttd?file=/app/main.tsx
In the attached video I am showing the steps taken to reproduce the bug from the reproduction link. Basically if you change the year in DatePicker's calendar - no matter which year you select - the year gets reset back to 1911. I was not able to reproduce this in Kendo's CodeSandbox examples until I noticed that they were using the legacy ReactDOM.render() instead of the new React 18's createRoot. As soon as I replaced it I was able to reproduce the bug.
Another strange observation is that I am able to reproduce this bug in only half of my tries after refresh, another colleague reproduces it in 20-25% of his tries, so it doesn't happen all the time but eventually it will. That's why I've recorded a video on a fresh reload of the attached reproduction. Also, you can sometimes see the year is already wrong after selecting it, or after subsequently selecting the month, or sometimes you don't see the year is reset to 1911 until after you select the specific date and the popup closes.
Although there are other ways to reproduce this issue, the one shown in the video is the easiest to hit the bad scenario. Also, we were not able to reproduce the issue on the DateTimePicker, although it seems to use the same Calendar component underneath.
Our assumptions having previously reported similar problems in Kendo after migrating to React 18 is that due to the concurrent rendering / batching of state updates in React 18's createRoot - something breaks the virtual scroll used in the calendar (in the video when I point to 1912 being the next year after the selected 2021, if we scroll a bit, the virtual scroll picks up and updates the incorrect years) so we end up with stale data for the year when selecting the month/date. This means that there might be other unwanted side effects that we just haven't stumbled upon.
This is a severe bug for our application's end users as they are unable to change the year in the date picker reliably. Falling back to the deprecated ReactDOM.render is not an option.
Hello,
We've been experiencing a weird behavior with the date picker element. We wanted to have an auto advancing cursor that moves from date -> month -> year without the user having to manually press the arrow keys.
We based our solution off this previous method in your JQuery element. However the React element has some buggy behavior when it comes to updating existing date values in the input that makes this method impossible. (the functionality works correctly in the JQuery version of the library, just not React)
When updating an existing value in the box from a single digit value (e.g. 01, 02, 03, 04, but not 10, 11, 12) instead of overwriting the existing value it appends the new number the user entered. For example, if a 01, is in the box and the user types 2 it becomes 12, when it should have become 02.
This can be especially confusing for the user when working with named dates (e.g. "Jan", "Feb", "Dec", etc) since they do not see the numbers involved. If the user is updating Jan, and they press 2. It should update to Feb not Dec...
I've attached a GIF of the problem below as I've described
Hello,
when using the StrictMode we get an UncaughtError when using the PopupComponent. Fe. when using the Date/Time-Picker.
ERROR
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
at checkForNestedUpdates (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:27287:11)
at scheduleUpdateOnFiber (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:25470:3)
at Object.enqueueSetState (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:14067:7)
at Component.setState (webpack-internal:///./node_modules/react/cjs/react.development.js:355:16)
at PopupWithoutContext.componentDidUpdate (webpack-internal:///./node_modules/@progress/kendo-react-popup/dist/es/PopupWithoutContext.js:285:18)
at commitLayoutEffectOnFiber (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:23328:30)
at commitLayoutMountEffects_complete (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:24683:9)
at commitLayoutEffects_begin (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:24669:7)
at commitLayoutEffects_begin (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:24651:11)
at commitLayoutEffects (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:24607:3)
The above error occurred in the <PopupComponent> component:
at PopupWithoutContext (webpack-internal:///./node_modules/@progress/kendo-react-popup/dist/es/PopupWithoutContext.js:97:28)
at eval (webpack-internal:///./node_modules/@progress/kendo-react-popup/dist/es/Popup.js:38:67)
at div
at AsyncFocusBlur (webpack-internal:///./node_modules/@progress/kendo-react-common/dist/es/hocs/AsyncFocusBlur.js:30:23)
at TimePickerWithoutContext (webpack-internal:///./node_modules/@progress/kendo-react-dateinputs/dist/es/timepicker/TimePicker.js:87:28)
at eval (webpack-internal:///./node_modules/@progress/kendo-react-common/dist/es/hocs/withPropsContext.js:28:95)
at component
at Field (webpack-internal:///./node_modules/@progress/kendo-react-form/dist/es/Field.js:37:22)
...
In our project we control column widths manually as we have complex logic on how wide each column should be, based on a number of external criteria. However, those widths are not fixed and might change during the lifetime of the data grid.
This was not causing any problems up to version 5.11.0 but after we upgraded the Kendo packages this controlled behavior of the column widths broke:
kendo-react-grid v5.11.0 example (working):
https://codesandbox.io/s/crazy-bird-ss7mgl?file=/app/main.tsx
kendo-react-grid latest example (broken):
https://codesandbox.io/s/dazzling-antonelli-wxsflj?file=/app/main.tsx
If we inspect the elements of the data grid, we can see that there is an inline style attribute on the header and body tables, setting the total width of those <table> elements to the sum of its columns. However, that value is not updating after the initial mount as it was prior to v5.12.0 which effectively makes the column widths uncontrollable.
Actual Result:
After invoking 'table' button, user is unable to select the size of the table i.e, Keyboard focus is not going to 'Insert row and column cell components.
Tab index property is not defined.
Expected
Control(s) must be accessible to keyboards and other assistive technology. Common causes of this problem include a) the element does not have a proper role assigned, b) the element needs tab-index="0" attribute to be focusable, or c) the component is not registering keypresses.
User should be able to navigate to insert row and column cell components to select the size of the table.
User Impact
When interactive components are not accessible, assistive technology users are blocked, which leads to everything from inaccessible content, features, and functionality, up to entire applications or sites.
When typing into a date picker and trying to type Feb 29th, 2024 (or any other leap year ofc) the date is updated incorrectly by the kendo date picker validation. As the user types the year their previous entry of 29 is updated to 28. This should update check should probably not occur until the user is done updating the input. If there is some fix or workaround we can do on our end to resolve this issue please let us know
Here's a video of the bug in our application
However, I was also able to reproduce the exact same behavior even in the documentation:
Dropdownbutton doesn't work in FF 66.0.2 on maxOS
1. Click on the dropdownbutton
2. Clicking outside of the dropdownbutton menu
3. The dropdownbutton does not close
Column locked with KendoReact Grid is not locked in the iPhone safari. It's OK in Chrome phone simulator, but not in mobile.
<Grid
style={{ height: '400px', width: '500px' }}
data={products}
reorderable
>
<Column field="ProductID" title="ID" width="45px" locked />
<Column field="ProductName" title="Name" width="250px" />
<Column field="Category.CategoryName" title="CategoryName" />
<Column field="UnitPrice" title="Price" width="90px" />
<Column field="UnitsInStock" title="In stock" width="90px" />
<Column field="UnitsOnOrder" title="On order" width="90px" />
<Column field="Discontinued" width="120px" locked={true} />
<Column field="QuantityPerUnit" title="Additional details" width="250px" />
</Grid>
There seems to be bug in the React Grid around date formatting inconsistencies:
Current behavior
When entering a date format of {0:dd/MM/yyyy} for a ColumnData prop, when in edit mode a calendar picker shows the date format as US date of MM/dd/yyyy.Expected behavior
The date should show as dd/MM/yyyy per the requested date format.Minimal reproduction of the problem with instructions
Create a Kendo grid with one column with following ColumnData:
const settlementDate: ColumnData = {
field: 'settlementDate',
title: 'Setlement Date',
format: '{0:dd/MM/yyyy}',
filterable: true,
filter: 'date',
editor: 'date'
};
Note that the date is displayed as MM/dd/yyyy
Change the format to "dd/MM/yyyy"
Note that when in view mode the date is displayed as "dd/MM/yyyy".
What is the motivation or use case for changing the behavior?
Currently I have to create a custom date cell for every instance of using a date field in my grid which is less than ideal.Environment
Package versions:
@progress/kendo-data-query@1.5.2
@progress/kendo-dateinputs-react-wrapper@2019.4.1014
@progress/kendo-base-component-react-wrapper@2019.2.606
@progress/kendo-drawing@1.6.0
@progress/kendo-dropdowns-react-wrapper@2019.4.1014
@progress/kendo-base-component-react-wrapper@2019.2.606 deduped
@progress/kendo-react-data-tools@3.9.0
@progress/kendo-react-common@3.9.0
@progress/kendo-react-dateinputs@3.9.0
@progress/kendo-date-math@1.2.0
@progress/kendo-react-buttons@3.9.0
@progress/kendo-react-common@3.9.0
@progress/kendo-react-popup@3.9.0
@progress/kendo-react-dropdowns@3.9.0
@progress/kendo-react-common@3.9.0
@progress/kendo-react-popup@3.9.0
@progress/kendo-react-grid@3.9.0
@progress/kendo-react-common@3.9.0
@progress/kendo-react-inputs@3.9.0
@progress/kendo-react-common@3.9.0
@progress/kendo-react-popup@3.9.0
@progress/kendo-react-intl@3.9.0
@telerik/kendo-intl@1.5.2
@progress/kendo-react-pdf@3.9.0
@progress/kendo-file-saver@1.0.7
@progress/kendo-theme-default@4.7.0
@progress/kendo-theme-material@3.5.0
@progress/kendo-ui@2019.3.1113Browser:Chrome (desktop) version 78.0.3904.108
System:
Platform: Windows
Other information:
It appears that there is an incompatibility as to what a text display field requires as opposed to what a date picker requires. For text display it requires a format of '{0:dd/MM/yyyy}' whereas the datepicker requires a format of "dd/MM/yyyy".
Actual Result:
On navigating to colors, Narrator is staying mute and not announcing anything.
Expected
On navigating to colors, Narrator should announce the name of the color.
When interactive elements have an incorrect name, it is difficult for people using assistive technology (like screen readers) to understand the purpose of control and its relationship to other content.
Hi Guys,
In GridProps for KendoReact Grid there is an error in the type information:
Found here: https://www.telerik.com/kendo-react-ui/components/grid/api/GridProps/#toc-rowrender
In the GridProps.d.ts file it is:
/**
* Fires when a row is about to be rendered. Overrides the default appearance of the row.
*/
rowRender?: (row: React.ReactElement<HTMLTableRowElement>, props: GridRowProps) => React.ReactNode;
This should be changed to:
rowRender?: (row: React.ReactElement<React.HtmlProps<HTMLTableRowElement>>, props: GridRowProps) => React.ReactNode;
Note that the React.ReactElement definition is:
interface ReactElement<P = any, T extends string | JSXElementConstructor<any> = string | JSXElementConstructor<any>> {
type: T;
props: P;
key: Key | null;
}
So the first type parameter should be the props typ.
I noted this while making use of it. After changing it it behaves sensibly. Worked around in my case by using 'as any' to void the type clash.
Cheers,
Stuart
When an item, which has submenu, from the menu dropdown is hovered the submenu appears. But if you click on the hovered item the submenu disappears.
Expected Behaviour
When an item, which has submenu, from the menu dropdown is hovered and then clicked the submenu should stay visible.
MInimal Reproduction
I'm providing a reproduction from Kendo React code examples.
https://stackblitz.com/edit/react-jqhjyv?file=index.js
StackBlitz example: https://stackblitz.com/edit/react-vg8pu5?file=app/main.jsx
If you have a Form <Field component={Input}> inside an <ExpansionPanel>, if you press space or enter within the input, the expansion panel also receives the key event and will expand/collapse. It seems like these key events should not bubble out of the Field component.
Steps to reproduce:
Expected result: The text in the notification is read by the screen reader when the notification appears
Actual result: The notification text is not read out
I've already log an issue on Github -> https://github.com/telerik/kendo-react/issues/1303
Submitting here as it is an important regression with React 18 and ReactDom.createRoot breaking Time picker.