import { InputNumber } from "antd"; const TimePicker = ({ setTime, time, disabled }) => { const seconds = parseInt(Math.floor(time) % 60); const minutes = parseInt(Math.floor(time / 60) % 60); const hours = parseInt(Math.floor(time / 3600)); const updateHours = (hours) => { setTime(parseInt(hours)*3600+parseInt(minutes)*60+parseInt(seconds)); } const updateMinutes = (minutes) => { setTime(parseInt(hours)*3600+parseInt(minutes)*60+parseInt(seconds)); } const updateSeconds = (seconds) => { setTime(parseInt(hours)*3600+parseInt(minutes)*60+parseInt(seconds)); } return <> {updateHours(x)}} addonAfter={`ч`} /> {updateMinutes(x)}} addonAfter={`м`} /> {updateSeconds(x)}} addonAfter={`с`} /> ; } export default TimePicker;