diff --git a/public/assets/vendor/css/core.css b/public/assets/vendor/css/core.css index 79538366..85124986 100644 --- a/public/assets/vendor/css/core.css +++ b/public/assets/vendor/css/core.css @@ -20475,7 +20475,7 @@ li:not(:first-child) .dropdown-item, } /* text-size */ .text-tiny{ - font-size: 10px; + font-size: 13px; } /* rtl:end:remove */ .text-primary { diff --git a/src/components/common/DatePicker.jsx b/src/components/common/DatePicker.jsx index bc0af783..929cb5b2 100644 --- a/src/components/common/DatePicker.jsx +++ b/src/components/common/DatePicker.jsx @@ -22,23 +22,22 @@ const DatePicker = ({ }); useEffect(() => { - if (inputRef.current) { - const parsedMinDate = minDate ? new Date(minDate.split("T")[0]) : undefined; - - flatpickr(inputRef.current, { - dateFormat: "d-m-Y", - allowInput: allowText, - defaultDate: value ? flatpickr.parseDate(value, "Y-m-d") : null, - maxDate: maxDate, - minDate: parsedMinDate, - onChange: function (selectedDates, dateStr) { - onChange(dateStr); - }, - ...rest - }); - } -}, [inputRef, minDate, maxDate]); - + if (inputRef.current) { + flatpickr(inputRef.current, { + dateFormat: "d-m-Y", + allowInput: allowText, + defaultDate: value + ? flatpickr.parseDate(value, "Y-m-d") + : null, + maxDate:maxDate, + minDate:new Date(minDate?.split("T")[0]) ?? null, + onChange: (selectedDates, dateStr) => { + onChange(dateStr); + }, + ...rest + }); + } + }, [inputRef]); return (