MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / handleTimeSelect

Function handleTimeSelect

apps/start/src/modals/date-time-picker.tsx:80–87  ·  view source on GitHub ↗
(timeValue: string)

Source from the content-addressed store, hash-verified

78 }
79
80 function handleTimeSelect(timeValue: string) {
81 const [hours, minutes] = timeValue.split(':').map(Number);
82 const newDate = new Date(selectedDate);
83 newDate.setHours(hours);
84 newDate.setMinutes(minutes);
85 // Ensure alignment to 5-minute intervals (safety measure)
86 setSelectedDate(roundToNearestFiveMinutes(newDate));
87 }
88
89 const currentTimeValue = `${selectedDate.getHours().toString().padStart(2, '0')}:${selectedDate.getMinutes().toString().padStart(2, '0')}`;
90

Callers 1

DateTimePickerFunction · 0.85

Calls 2

mapMethod · 0.45

Tested by

no test coverage detected