Closed junplid closed 9 months ago
I apologize for my inattention, I looked at the documentation at: https://reactdatagrid.io/docs/filtering#date-filters
and a little more at: https://github.com/inovua/reactdatagrid/blob/master/examples/pages/filters/date-filter.page.tsx#L20
which has this code:
import moment from 'moment';
import { getGlobal } from '@inovua/reactdatagrid-community/getGlobal';
const globalObject = getGlobal();
let window = globalObject || globalThis;
if ((window as any).moment == null) {
(window as any).moment = moment;
}
I inserted this code in the /src/main.tsx file and it ended up looking like this: The application is working as expected
import "./App.css";
import ReactDOM from "react-dom/client";
import App from "./App";
import { CookiesProvider } from "react-cookie";
import moment from "moment";
import { getGlobal } from "@inovua/reactdatagrid-community/getGlobal";
const globalObject = getGlobal();
let window = globalObject || globalThis;
if ((window as any).moment == null) {
(window as any).moment = moment;
}
ReactDOM.createRoot(document.getElementById("root")!).render(
<CookiesProvider>
<App />
</CookiesProvider>
);
The solution above does not address the other error that @junplid reported:
react-dom.development.js:86 Warning: React does not recognize the
endInputprop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase
endinputinstead. If you accidentally passed it from a parent component, remove it from the DOM element.
. This error occurs when switching the Date Filter from "On" to "In Range" in the menu.
@inovua/reactdatagrid-community
: '^5.10.2'Relevant code or config
What you did: tried to implement the date range filtering (inrange) with the code above.
What happened: the filter does not work when selecting the date range
console browser:
I'm using Vite in version: ^4.4.5 and ReactJS in version: ^18.2.0 @inovua-admin I thank you in advance, and I apologize for anything