Skip to content

Commit

Permalink
remove readonly from month picker
Browse files Browse the repository at this point in the history
  • Loading branch information
aldabil21 committed Nov 25, 2022
1 parent 0920f08 commit 85cf81a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aldabil/react-scheduler",
"version": "2.5.11",
"version": "2.5.12",
"description": "React scheduler component based on Material-UI & date-fns",
"files": [
"*"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/nav/MonthDateBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const MonthDateBtn = ({ selectedDate, onChange }: MonthDateBtnProps) => {
const toggleDialog = () => setOpen(!open);

const handleChange = (e: Date | null) => {
console.log(e);
onChange(e || new Date(), "selectedDate");
};
const handlePrev = () => {
Expand All @@ -40,7 +41,6 @@ const MonthDateBtn = ({ selectedDate, onChange }: MonthDateBtnProps) => {
openTo="month"
views={["year", "month"]}
value={selectedDate}
readOnly
onChange={handleChange}
renderInput={(params) => (
<Button ref={params.inputRef} style={{ padding: 4 }} onClick={toggleDialog}>
Expand Down

0 comments on commit 85cf81a

Please sign in to comment.