Output Date (Deprecated)
ui:outputDate
Deprecated as of API version 47.0. We recommend migrating to Lightning Web Components and using the lightning-formatted-date-time component.
For Use In
Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Lightning Out (Beta), Standalone Lightning App
We recommend using Lightning Web Components whenever possible. When migrating to Lightning Web Components, use lightning-formatted-date-time.
For more information, see Aura Components in the ui Namespace Are Deprecated.
A ui:outputDate component represents a date output in the YYYY-MM-DD format and is wrapped in an HTML span tag. We recommend using lightning:formattedDateTime instead of ui:outputDate.
ui:outputDate can be used with ui:inputDate, which takes in a date input. To apply Lightning Design System styling, we recommend that you use lightning:input with type="date" instead of ui:inputDate.
ui:outputDate retrieves the browser's locale information and displays the date accordingly. To display a date, you can use an attribute value and bind it to the ui:outputDate component.
The previous example renders the following HTML.
To display record data for Salesforce objects, use lightning:outputField with lightning:recordViewForm, or use lightning:recordForm. To display record data with a custom layout, use force:recordData.