- {!isLocalZone && fmtLocal(value?.end)}
-
- setManualEntry(false)}
- endIcon={}
- >
- Configure as duration
-
-
-
- }
- timeZone={zone}
- disabled={q.loading}
- />
- ) : (
- {
- const nextValDT = DateTime.fromISO(nextVal, { zone })
- const formValDT = DateTime.fromISO(formValue?.start ?? '', {
- zone,
- })
- const duration = dtToDuration(formValDT, nextValDT)
- return duration === -1 ? '' : duration.toString()
- }}
- // value held in state
- mapOnChangeValue={(
- nextVal: string,
- formValue: TempSchedValue,
- ) => {
- if (!nextVal) return ''
- return DateTime.fromISO(formValue.start, { zone })
- .plus({ hours: parseFloat(nextVal) })
- .toISO()
- }}
- step='any'
- min={0}
- disabled={q.loading}
- hint={
- setManualEntry(true)}
- endIcon={}
- >
- Configure as date/time
-
- }
- />
- )}
-