--- title: Coveo Date Sort slug: '3062' canonical_url: https://docs.coveo.com/en/3062/ collection: coveo-for-sitecore-v5 source_format: adoc --- # Coveo Date Sort > **Legacy feature** > > The Coveo Hive Framework is now in maintenance mode and is no longer recommended for new implementations. > > To build new search experiences, use one of Coveo's more modern, lightweight, and responsive libraries. > To get started, see the [Build search](https://docs.coveo.com/en/2473/) article. By default, the **{doctitle}** rendering implements the [Coveo JavaScript Search Framework](https://docs.coveo.com/en/187/) [Sort](https://coveo.github.io/search-ui/components/sort.html) component with the `sortCriteria` component option set to `date `. Clicking the **Coveo Date Sort** search interface button allows the user to switch to search result sorting based on the modified date of the item. Subsequent clicks allow the user to toggle between ascending and descending sort directions (if the `Enable both sort directions` option is enabled). [.version.c4sc.c4sc-new.5-0-788-5.September-18&-2020] [Coveo for Sitecore 5.0.788.5](https://docs.coveo.com/en/3314#release-notes) When the wrapping [Results Sorts Section](https://docs.coveo.com/en/3052/) rendering `Enable sort dropdown` data source option is enabled, the **{doctitle}** rendering adds one or two date sort items (depending on the `Enable both sort directions` value) to a sort dropdown list (see the [Coveo JavaScript Search Framework](https://docs.coveo.com/en/187/) [SortDropdown](https://coveo.github.io/search-ui/components/sortdropdown.html) component). ## Usage notes * The modified date of the item is stored in the `updated` Coveo Special Field. All fields in this template are automatically indexed. Therefore, no prior field indexing action is required to be able to use the **Coveo Date Sort** rendering. * Any time you change result sorting (whether by changing the criterion or the sort direction), this triggers a Search API call with the requested `sortCriteria` in the query parameters. * {empty} -- [.version.c4sc.c4sc-new.5-0-788-5.September-18&-2020] [Coveo for Sitecore 5.0.788.5](https://docs.coveo.com/en/3314#release-notes) -- See [List result sort options in a dropdown menu](https://docs.coveo.com/en/3316/) for more details about managing sort direction captions when displaying sort options in a dropdown menu. * You can [customize the CSS](https://docs.coveo.com/en/2342/) associated with this rendering. ## Insertion location

Coveo Hive

The Coveo Date Sort rendering is an Allowed Control in the following placeholder(s): Sorts

Example insertion sequence for the Coveo Date Sort rendering.

Coveo Hive SXA

Coveo for Sitecore SXA rendering insertion locations aren't limited by placeholder Allowed Controls. The Coveo Date Sort rendering may therefore be inserted throughout the partial design, whether in Coveo for Sitecore or Sitecore placeholders.

Example insertion sequence for the Coveo Date Sort rendering.
## Data source options The following table lists the available data source options for this rendering. [%header,cols="34%,66%"] |=== |Option name |Description |Caption |See the [caption](https://coveo.github.io/search-ui/components/sort.html#options.caption) component option. |Sort direction |See the [sortCriteria](https://coveo.github.io/search-ui/components/sort.html#options.sortcriteria) component option. a|Enable sort direction toggle -- [.version.c4sc.c4sc-new.5-0-788-5.September-18&-2020] [Coveo for Sitecore 5.0.788.5](https://docs.coveo.com/en/3314#release-notes) -- Enable both sort directions |Specifies whether to allow sorting in both sorting directions. |DOM unique ID a|{empty} -- Randomly generated HTML element ID. -- |Additional data attributes a|{empty} -- Allows [use of the Coveo JavaScript Search Framework **Sort** component options](https://docs.coveo.com/en/2776/) that aren't directly available in the data source. -- |=== ## Sample generated HTML and corresponding visual output ```html
Date
``` ![Date sort example gif | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/date-sort-example.gif)