create: initial value can't be min or max
This commit is contained in:
parent
d7308a5787
commit
c339253507
|
|
@ -160,8 +160,8 @@ export function NewContract(props: {
|
||||||
isFinite(max) &&
|
isFinite(max) &&
|
||||||
min < max &&
|
min < max &&
|
||||||
max - min > 0.01 &&
|
max - min > 0.01 &&
|
||||||
min <= initialValue &&
|
min < initialValue &&
|
||||||
initialValue <= max))
|
initialValue < max))
|
||||||
|
|
||||||
function setCloseDateInDays(days: number) {
|
function setCloseDateInDays(days: number) {
|
||||||
const newCloseDate = dayjs().add(days, 'day').format('YYYY-MM-DD')
|
const newCloseDate = dayjs().add(days, 'day').format('YYYY-MM-DD')
|
||||||
|
|
@ -327,7 +327,7 @@ export function NewContract(props: {
|
||||||
min !== undefined &&
|
min !== undefined &&
|
||||||
max !== undefined &&
|
max !== undefined &&
|
||||||
min < max &&
|
min < max &&
|
||||||
(initialValue < min || initialValue > max) && (
|
(initialValue <= min || initialValue >= max) && (
|
||||||
<div className="mt-2 mb-2 text-sm text-red-500">
|
<div className="mt-2 mb-2 text-sm text-red-500">
|
||||||
Initial value must be in between {min} and {max}.{' '}
|
Initial value must be in between {min} and {max}.{' '}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user