fix date picker panel iot that is not selectable
This commit is contained in:
1 parent
520c4bcaad
commit
050664eba2
1 file changed
+4
-1
@@ -253,7 +253,10 @@ const IotPanelPage: React.FC<{ onSettings: () => void }> = ({ onSettings }) => {
|
|||||||
}, [selectedKandang, selectedCycle, summary, dayAge, selectedDate]);
|
}, [selectedKandang, selectedCycle, summary, dayAge, selectedDate]);
|
||||||
|
|
||||||
const datePickerMin = selectedCycle?.start_date ?? undefined;
|
const datePickerMin = selectedCycle?.start_date ?? undefined;
|
||||||
const datePickerMax = selectedCycle ? resolveCycleBoundDate(selectedCycle) : undefined;
|
// IoT panel is real-time — not subject to the publish cutoff that
|
||||||
|
// resolveCycleBoundDate() applies via soft_end_date → visible_through_date().
|
||||||
|
// Closed cycles use end_date; open cycles go up to today.
|
||||||
|
const datePickerMax = selectedCycle?.end_date ?? todayIso();
|
||||||
|
|
||||||
if (!selectedCycle) return <EmptyFarm onSettings={onSettings} />;
|
if (!selectedCycle) return <EmptyFarm onSettings={onSettings} />;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user