diff --git a/package.json b/package.json index 8bddf88e..173ef22d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gameflow-tv/flume", - "version": "0.3.13", + "version": "0.3.14", "description": "React implementation of the Flume design system", "module": "dist/index.js", "files": [ diff --git a/src/lib/components/inputs/Calendar/Calendar.tsx b/src/lib/components/inputs/Calendar/Calendar.tsx index 44ec795b..bc90a036 100644 --- a/src/lib/components/inputs/Calendar/Calendar.tsx +++ b/src/lib/components/inputs/Calendar/Calendar.tsx @@ -192,7 +192,9 @@ export type CalendarProps = { export const Calendar = forwardRef((props: CalendarProps, ref) => { const theme = useTheme() - const [selectedDate, setSelectedDate] = useState(props.defaultDate?.valueOf()) + const [selectedDate, setSelectedDate] = useState( + props.defaultDate ? props.defaultDate.valueOf() : 0 + ) const [month, setMonth] = useState(today.getMonth()) const [year, setYear] = useState(today.getFullYear()) const [monthDetails, setMonthDetails] = useState( @@ -296,8 +298,7 @@ export const Calendar = forwardRef((props: CalendarProps, ref) => { (isSelectedDay(day, selectedDate) ? ' selected' : '') } onClick={() => onDateClick(day)} - {...styles} - > + {...styles}> {day.month !== 0 ? !isNullOrUndefined(props.dateBoxDisabledTxt) ? props.dateBoxDisabledTxt