1. SXA Search

Localize date formats for SXA search

Version:

SXA lets you use search renderings, such as the Filter (Date) rendering, to allow visitors to refine search results based on dates. To be able to display localized date formats, weekday names, and month names, you can download datepickers in a specific language from github and add them to your SXA site theme(s).Ā 

To install a local datepicker:

  1. Download the relevant file from Ā github.

  2. Open the file and change:

    factory( jQuery.datepicker );

    to

    factory( $xa.datepicker );Ā 

  3. Save the file.

  4. To make the local datepicker available on your pages:

    • For all themesĀ - upload the file toĀ /sitecore/Media Library/Base Themes/Core Libraries/scriptsĀ and position it afterĀ xaquery.

    • For a specific themeĀ - upload the file to theĀ Scripts folder of that theme.Ā 

      SXA-language-scripts-calendar.PNG
  5. Switch the language of your site or page, refresh the page in Experience Editor, and go to Preview mode. You can see the calendar displays in the correct language.

    SXA-calendar-language.PNG
If you have suggestions for improving this article, let us know!