• prest nand
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 1
    Replies
How can i round or truncate off the decimal? I don't want the decimal to show. If a user input 1.5 I want it to show either 2 or 1 so either round up or truncate off the decimal, either one works. 

Right now I have:
<lightning:input type="number"  value="{!v.customNumber__c}"/>

Any help is greatly appreciated, thank you.
 
Hi, I currently have the code below
<td data-label="TESTING"><lightning:input type="number" min="0" label="" name=" " value="{!v.testint.test__c}"/></td>
I don't want any decimals, so if there is a decial a error will show up, as seen in the pic below 
User-added image
I also have a Next button at the bottom of the page. Is it possible to make the page stay on the current page when a error such as the above shows up? And only allow the page to go to the next section when the number have been changed from a decimal to a whole number, or when there are no errors shown.