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
Daniel González J.Daniel González J. 

Lightning:input type=“date”: how to change the date fomat - Summer'18

Best Answer chosen by Daniel González J.
Raj VakatiRaj Vakati
I could say use ui:inputDate
 
<ui:inputDate aura:id="expdate" label="Today's Date"  value="2017-09-07" displayDatePicker="true"
                      class="slds-input lgcp-1000001 slds-form-element__control slds-input-has-icon slds-input-has-icon_right slds-input" labelClass="slds-form-element__label" format="2017-09-07"/>



I tried many ways but dnt worked with  Lightning:input type=“date” . Refer this code as well if you want to try other options 
 
<aura:component >
    <lightning:input type="date" name="input8"  aura:id="inpDate"
                     label="Dates" value="2017-09-07" min="2017-09-05" max="2017-09-22"
                     format ="DD/MM/YYYY" onchange="{!c.myAction}" pattern="([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))"/>
    
        <ui:inputDate aura:id="expdate" label="Today's Date"  value="2017-09-07" displayDatePicker="true"
                      class="slds-input lgcp-1000001 slds-form-element__control slds-input-has-icon slds-input-has-icon_right slds-input" labelClass="slds-form-element__label" format="2017-09-07"/>      

    
</aura:component>
 
({
    myAction : function(component, event, helper) {
        var dates = component.find("inpDate").set("v.pattern","([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))") ;
        console.log(dates );
        
    }
})