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

Fix doc for date picker broswerLocale #348

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/change-date-format/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ By default the date and time formats used by the date and time fields, for examp

The configurations work as follows:
* if `useBrowserLocale` is `true`, then the `timeFormat` and `dateFormat` will be disregarded.
* the `browserLocaleFormatWidth` can be either `short`, `medium` or `long`, if this property is not provided and `useBrowserLocale` is `true`, it will default to `short`
* the `browserLocaleFormatWidth` can be either `short` or `long`, if this property is not provided and `useBrowserLocale` is `true`, it will default to `short`
* there are certain limitation that apply to the `timeFormat` and `dateFormat`. The date format accepts only a certain subset of date formats and the time format accepts only a certain subset of time formats. You may find the supported formats below:

Example behavior of `useBrowserLocale` if the browser's language is English (US).
* If the `browserLocaleFormatWidth` is set to `long` the formats used in the date and time field will be `"h:mm:ss a"` and `"MMMM d, y"`, which will look like `9:22:13 am` and `July 10, 2021`.
* If the `browserLocaleFormatWidth` is set to `medium` the formats used in the date and time field will be `"h:mm:ss a"` and `"MMM d, y"`, which will look like `9:22:13 am` and `Jul 10, 2021`.
* If the `browserLocaleFormatWidth` is set to `short` the formats used in the date and time field will be `"h:mm a"` and `"M/d/yy"`, which will look like `9:22 am` and `7/10/2021`.

The formats that are available for each supported culture are stored in a .json file located in `{rootDirectory}\SitefinityWebApp\AdminApp\assets\date-time-formats\date-time-formats.json`. You may edit this file to your needs, but if you do, please make sure to back it up since upgrading Sitefinity may overwrite your changes.


Date formats:
```
Expand Down