How to change the date fomat using Lightning:input type=“date” ?
I'm trying to change date format of this component but I dont find any attribute (like ui:inputDate has) to change the date format.
NOTE:Also I have used the new
This is an example of official lightning input here: LightningInput docs
The first one is Lightning input, the second one is ui:inputDate component.
I'm guessing it is changed by your Time Zone but actually, there is no change at all.
Any ideas about how can I use it with the date format I want (DD/MM/YYYY)? Thanks
There's no 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. It need to be done with ui:input formatting lightning input is not available. type="datetime-local" is not working seems a bug at salesforce or not yet implemented yet