I've been attempting to adjust the width of the date picker, but I'm having trouble achieving it.
Below is my code:
import React from "react";
import ReactDOM from "react-dom";
import { DatePicker, RangeDatePicker } from "@y0c/react-datepicker";
// import calendar style
// You can customize style by copying asset folder.
import "@y0c/react-datepicker/assets/styles/calendar.scss";
// Please include the locale you want to use.
// and delivery props to calendar component
import "dayjs/locale/ko";
import "dayjs/locale/en";
import "./styles.css";
const Panel = ({ header, children }) => (
<div style={{ height: "300px" }}>
<h1>{header}</h1>
<div>{children}</div>
</div>
);
function App() {
const onChange = title => (...args) => console.log(title, args);
return (
<div className="App">
<Panel header="Simple DatePicker">
<DatePicker style={{width: "800px"}} showToday onChange={onChange("DatePicker")} />
</Panel>
</div>
);
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
I attempted using
style={{width: "800px"}}
, but unfortunately it did not work... Could someone please assist me with this?
Thank you very much!
Note: My code can be found here https://codesandbox.io/s/react-datepicker-forked-ljh6y