import * as moment from "moment";
import * as React from "react";
import { Form } from "semantic-ui-react";
import { TimeOfDay } from "@common/sprinklersRpc";
import TimeInput from "./TimeInput";
function timeToString(time: TimeOfDay) {
return moment(time).format("LTS");
}
export default class ScheduleTimes extends React.Component<{
times: TimeOfDay[];
onChange: (newTimes: TimeOfDay[]) => void;
editing: boolean;
}> {
render() {
const { times, editing } = this.props;
let timesNode: React.ReactNode;
if (editing) {
timesNode = times
.map((time, i) =>