fix all day checkbox

This commit is contained in:
Dobromir Popov
2024-02-23 14:24:58 +02:00
parent 560d503219
commit 950a458c94

View File

@ -379,6 +379,7 @@ export default function AvailabilityForm({ publisherId, existingItem, inline, on
isChecked: e.target.checked,
}));
setSlots(updatedSlots);
setAllDay(e.target.checked)
console.log("handleAllDayChange: allDay: " + allDay + ", updatedSlots: " + JSON.stringify(updatedSlots));
};
useEffect(() => {
@ -418,7 +419,7 @@ export default function AvailabilityForm({ publisherId, existingItem, inline, on
return (
<>
<label className="checkbox-container flex items-center mb-4">
<input type="checkbox" checked={allDay} onChange={e => setAllDay(e.target.checked)} className="form-checkbox h-5 w-5 text-gray-600 mx-2" />
<input type="checkbox" checked={allDay} onChange={e => handleAllDayChange(e)} className="form-checkbox h-5 w-5 text-gray-600 mx-2" />
Цял ден
<span className="checkmark"></span>
</label>