lightning-input type="date" formatting

Sample Code:

Component:


  1. <aura:component implements = "force:appHostable">  
  2.       
  3.     <div class="slds-box slds-theme_default">   
  4.           
  5.         <lightning:input name="input1" label="Enter a date" type="date" dateStyle="short" />  
  6.         <lightning:input name="input2" label="Enter a date" type="date" dateStyle="medium" />  
  7.         <lightning:input name="input3" label="Enter a date" type="date" dateStyle="long" />  
  8.           
  9.     </div>  
  10.       
  11. </aura:component>  

Output:



No comments:

Post a Comment