0
I need help in react-data-grid for acess calander.. Please help . When I click on date my calendar not come out..
import logo from "./logo.svg"; import "./App.css"; import "react-data-grid/lib/styles.css"; import DataGrid, { textEditor } from "react-data-grid"; const validateEmail = value => { if (!value) return "Email is required"; if (!/^[a-zA-Z0-9]+@[a-zA-Z0-9]+\.[A-Za-z]+$/.test(value)) return "Invalid email address"; }; //The error has been fixed. const columns = [ { key: "id", name: "ID",editor:textEditor }, { key: "date", name: "Date",editor: MohiveDatePicker }, { key: "email", name: "email",editor:textEditor, validate:validateEmail}, ]; const rows = [{ id: 0, date: "2023-01-02", email: "jane@example.com" }]; function App() { return <DataGrid columns={columns} rows={rows} />; } export default App;
9 odpowiedzi
+ 1
Please use codesandbox or similar site to share your react code.
So we can run it in same environment as you do.
Also where did you define MohiveDatePicker? I can't see this data anywhere. It should be imported also or?
I tried to test code and I needed to delete first 2 imports(svg and css file you didnt included it) and then I get MohiveDatePicker is not defined.
+ 1
You have forgotten to write MohiveDatePicker function
0
Silly we don't know how to help if you are not sharing your code.
0
Bro how send you code ? Send me your telegarm or whatspp no
0
https://codesandbox.io
You can use this site or some other similar.
Just copy/paste code, and make sure you added dependencies.
Then share us your code.
0
Ok bro