Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
438 B
3
Indexable
Never
    const handleStartTimeSelect = (event: { value: Date }) => {
        const hours = event.value.getHours().toString().padStart(2, '0');
        const minutes = event.value.getMinutes().toString().padStart(2, '0');
        setSelectedStartTime(`${hours}:${minutes}` + ":00");
    };

    <Datepicker
        controls={['time']}
        stepMinute={15}
        timeFormat="HH:mm"
        onChange={handleStartTimeSelect}
    />