<lightning:input type="number" name="min_perc" aura:id="required" required="true" class="label-text minPerc" min="0" max="99" value="{!v.min_perc}" messageWhenRangeOverflow="Value out of range" messageWhenRangeUnderflow="Value out of range" autocomplete="off" onchange="{!c.onChangePerc}" onblur="{!c.checkValidity}" step="1"/>
<lightning:input type="number" name="max_perc" aura:id="required" required="true" class="label-text maxPerc" value="{!v.max_perc}" min = "0" max="99" messageWhenRangeOverflow="Value out of range" messageWhenRangeUnderflow="Value out of range" autocomplete="off" step="1" onblur="{!c.checkValidity}" onchange="{!c.onChangePerc}"/>
Hi I have this 2 lightning:input in aura component and I want to be able to change the min and max values in js controller, I've also tried setting them using a ternary operation like min = "{!v.min_perc ? v.min_perc + 1 : 0 }"
but it doesn't seem to work I can't use aura:id since all the lightning:input have the same id that i use in another logic. I've also tried document.getElementsByClassname or something like var minOfMin = component.find('min_perc').get('v.min');
but again it doesn't work.
Any suggestions? Thanks