diff --git a/client/src/components/eula/eula.component.jsx b/client/src/components/eula/eula.component.jsx index 3dca72951..964a0751d 100644 --- a/client/src/components/eula/eula.component.jsx +++ b/client/src/components/eula/eula.component.jsx @@ -188,7 +188,7 @@ const EulaFormComponent = ({ form, handleChange, onFinish, t }) => ( }, ]} > - diff --git a/client/src/components/form-date-picker/form-date-picker.component.jsx b/client/src/components/form-date-picker/form-date-picker.component.jsx index 0f84fe68e..187d8d841 100644 --- a/client/src/components/form-date-picker/form-date-picker.component.jsx +++ b/client/src/components/form-date-picker/form-date-picker.component.jsx @@ -16,7 +16,16 @@ export default connect(mapStateToProps, mapDispatchToProps)(FormDatePicker); const dateFormat = "MM/DD/YYYY"; -export function FormDatePicker({bodyshop, value, onChange, onBlur, onlyFuture, isDateOnly = true, ...restProps }) { +export function FormDatePicker({ + bodyshop, + value, + onChange, + onBlur, + onlyFuture, + onlyToday, + isDateOnly = true, + ...restProps + }) { const ref = useRef(); const handleChange = (newDate) => { @@ -87,9 +96,13 @@ export function FormDatePicker({bodyshop, value, onChange, onBlur, onlyFuture, i onBlur={onBlur || handleBlur} showToday={false} disabledTime - {...(onlyFuture && { - disabledDate: (d) => dayjs().subtract(1, "day").isAfter(d), - })} + disabledDate={(d) => { + if (onlyToday) { + return !dayjs().isSame(d, 'day'); + } else if (onlyFuture) { + return dayjs().subtract(1, "day").isAfter(d); + } + }} {...restProps} />