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

There's not a way to specify the date format for date or datetime input fields lightning:input / lightning:inputField. This is meant to be controlled by the user's locale per the component library docs "The date and time formats are automatically validated against the user’s Salesforce locale format during the onblur event".

The formats you should expect to see for each locale are documented here: Supported Locales.

The incorrect format you are seeing is due to this known issue: Lightning:input $Locale date/time formats are inconsistent with the docs. As Avijit suggests, the current workaround is to use ui:inputDate, but hopefully Salesforce will fix this soon.


in Summer 19 SF add new attribute dateStyle for lightning:inpput date and datetime type fields link. in your case dateStyle="short" works for you

<lightning:input aura:id="dob" type="date" name="accdob" dateStyle="short" label="Date of Birth" value="{!v.object.DOB__c}" />

Updating answer : it need to be done with ui:input

<ui:inputDate aura:id="EndDateField" value="" displayDatePicker="true" format="MM/dd/yyyy"/>

formatting lightning input is not available. type="datetime-local" is not working seems a bug at salesforce or not yet implemented yet