Fix schedules invalid dates issue (#3541)

# What this PR does

Fix schedules invalid dates issue

## Which issue(s) this PR fixes

https://github.com/grafana/support-escalations/issues/8084

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
This commit is contained in:
Maxim Mordasov 2023-12-11 17:17:41 +03:00 committed by GitHub
parent abb698e825
commit fcad289089
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View file

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Fixed
- Fix schedules invalid dates issue ([#support-escalations/issues/8084](https://github.com/grafana/support-escalations/issues/8084))
## v1.3.76 (2023-12-11)
### Fixed

View file

@ -16,10 +16,13 @@ const mondayDayOffset = {
};
export const getWeekStartString = () => {
if (!config.bootData.user.weekStart || config.bootData.user.weekStart === 'browser') {
const weekStart = (config.bootData.user.weekStart || '').toLowerCase();
if (!weekStart || weekStart === 'browser') {
return 'monday';
}
return config.bootData.user.weekStart;
return weekStart;
};
export const getNow = (tz: Timezone) => {