Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volunteers Personal Site: The DateFormat URL parameter does not persist when navigating across Personal Site pages #488

Open
jamesbsfdc opened this issue Apr 23, 2020 · 4 comments

Comments

@jamesbsfdc
Copy link

jamesbsfdc commented Apr 23, 2020

The Volunteers Personal Site should be able to cater for international users who expect elements of the page to display with their correct locale settings. Specifically, date fields on the Personal Site pages should be displayed in the relevant locale of the user.

Currently the Personal Site Contact page relies on two URL parameters to correctly display all of the dates on the page in the European date format
i.e Language=en-gb&DateFormat=dd/MM/yyyy

The issue however is once the user lands on the page, if they browse to other pages within the site, and indeed back to the Personal Site Contact Info page, the DateFormat parameter is not preserved in the URL so dates will default back to the non-European date format.

By default the Personal Site navigation contains links to the following VFS pages

  • Volunteer Jobs
  • Job Calendar
  • View your information
  • Report Hours

The URL links for each of these pages in the Personal Site contain the Language parameter by default, however they do not contain the DateFormat parameter.

If a user navigates to the Personal Site via a URL such as .... Language=en-gb&DateFormat=dd/MM/yyyy they will notice that the Language parameter for each Personal Site page contains the parameter as Language=en-gb.

When a user clicks on the Volunteer Jobs page the format of the dates will be in the non-European date format, as the URL does not contain the parameter DateFormat=dd/MM/yyyy

As the Job Calendar does not display date fields by default, there is no immediate issue however the Job Calendar does list jobs and if the user clicks on any of these jobs there will be taken to the Volunteer Jobs page which again will default to the non-European date format.

The Report Hours page seems to use the Language parameter rather than the DateFormat parameter to set the date format of any job selected from the Volunteer Job dropdown and so as this parameter is preserved in the URL the dates do display correctly.

Additionally because the DateFormat parameter does not persist in any of the links above if the user browses around the Personal Site and then back to the Personal Site Contact Info page from any other page, some of the dates on the page will again default to a non-European date format

@jamesbsfdc
Copy link
Author

**lurch: add

@LurchTheButler
Copy link

Tracking W-041033

@abulfazalSF
Copy link

abulfazalSF commented Apr 27, 2020

1 - Clone the personal site template visualforce page. You will need to change some of the page references when cloning or you will get errors (as shown near the bottom of https://powerofus.force.com/s/article/V4S-Customize-Vol-Personal-Site-Pages)

2 - add '&dateformat=dd/MM/yyyy' to the url for each button (see image below)

3 - add the same string to the link that gets sent to volunteers when they sign up (I created a formula field that does this so I don’t need to mess about with merge fields in email templates)

4 - The date will now be in the UK format

image

Also, this date format will remain even if a user clicks on the other tabs
Hope this helps, let me know if you need more information :)

@jamesbsfdc
Copy link
Author

Thanks for the reply @abulfazalSF - good to know. I logged the issue in the hope this can be changed in the package itself without requiring the need to clone the page, as this is beyond some users :)

@jamesbsfdc jamesbsfdc changed the title Volunteers Personal Site: Supporting European users by ensuring links within the Personal Site to other pages preserve the DateFormat URL parameter Volunteers Personal Site: The DateFormat URL parameter does not persist when navigating across Personal Site pages Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants