IO-1721 Update time ticket time fields to be in 5 minute increments.

This commit is contained in:
Patrick Fic
2022-02-14 10:41:09 -08:00
parent b84935efdc
commit f884d2e23f
2 changed files with 19 additions and 17 deletions

View File

@@ -19,26 +19,26 @@ const DateTimePicker = (
return (
<div id={id}>
<FormDatePicker
{...restProps}
{...(onlyFuture && {
disabledDate: (d) => moment().subtract(1, "day").isAfter(d),
})}
value={value}
onBlur={onBlur}
onChange={onChange}
{...(onlyFuture && {
disabledDate: (d) => moment().subtract(1, "day").isAfter(d),
})}
value={value}
onBlur={onBlur}
onChange={onChange}
{...restProps}
/>
<TimePicker
{...restProps}
value={value ? moment(value) : null}
{...(onlyFuture && {
disabledDate: (d) => moment().isAfter(d),
})}
onChange={onChange}
showSecond={false}
minuteStep={15}
onBlur={onBlur}
format="hh:mm a"
value={value ? moment(value) : null}
{...(onlyFuture && {
disabledDate: (d) => moment().isAfter(d),
})}
onChange={onChange}
showSecond={false}
minuteStep={15}
onBlur={onBlur}
format="hh:mm a"
{...restProps}
/>
</div>
);

View File

@@ -212,6 +212,7 @@ export function TimeTicketModalComponent({
<>
<Form.Item label={t("timetickets.fields.clockon")} name="clockon">
<FormDateTimePicker
minuteStep={5}
disabled={
!HasRbacAccess({
bodyshop,
@@ -245,6 +246,7 @@ export function TimeTicketModalComponent({
]}
>
<FormDateTimePicker
minuteStep={5}
disabled={
!HasRbacAccess({
bodyshop,