Skip to content

Commit

Permalink
fix: calendar selectionMode
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnypaulino committed Dec 14, 2024
1 parent 10296cb commit 510a10d
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/Components/Calendar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const CalendarComponent = ({
view,
dateFormat,
selectionMode

}: PropsInputCalendar) => {
addLocale("pt-br", {
firstDayOfWeek: 1,
Expand Down Expand Up @@ -58,12 +58,25 @@ const CalendarComponent = ({
today: "Hoje",
clear: "Limpiar",
});
if (selectionMode) {
return (
<Calendar
value={value}
onChange={onChange}
dateFormat={dateFormat}
selectionMode={selectionMode}
style={{ width: "100%" }}
locale="pt-br"
name={name}
placeholder={placeholder}
/>
);
}
return (
<Calendar
value={value}
onChange={onChange}
dateFormat={dateFormat}
selectionMode={selectionMode}
style={{ width: "100%" }}
locale="pt-br"
name={name}
Expand Down

0 comments on commit 510a10d

Please sign in to comment.