function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aakanksha SinghAakanksha Singh 

Setting min max in ui:inputnumber

Hello Everyone,

Is there any way we can set min/max in ui:inputnumber tag, as we do in
<input type= "number" min="0" max="10"/>

Please reply
Thanks
sfdcMonkey.comsfdcMonkey.com
hi Aakanksha Singh
there is no availbale attribute like max, or mix on <ui:inputNumber> but you can use blow code in your component for set min or max number its same as <ui:inputNumber>

<div class="slds-form-element">
          <div class="slds-form-element__control"> 
              <input type="number" aura:id="number" name="quantity" min="1" max="5" class="slds-input" labelClass="slds-form-element__label" value="{! v.YourAttribute}"/>
          </div>
      </div>

​its look as standred field 
User-added image


thanks :)
If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

 
Aakanksha SinghAakanksha Singh
Thanx for the help.
sfdcMonkey.comsfdcMonkey.com
pleasure
If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer. ;-)