woocommerce/plugins/woocommerce-admin/docs/components/packages/date.md

553 B

Date (component)

Use the Date component to display accessible dates or times.

Props

date

  • Required
  • Type: One of type: string, object
  • Default: null

Date to use in the component.

machineFormat

  • Type: String
  • Default: 'Y-m-d H:i:s'

Date format used in the datetime prop of the time element.

screenReaderFormat

  • Type: String
  • Default: 'F j, Y'

Date format used for screen readers.

visibleFormat

  • Type: String
  • Default: 'Y-m-d'

Date format displayed in the page.