TimePicker: some fixes and polish after testing feedback (#24585)

* make sure we render the delaynow value from dashboard to the time picker settings.

* Added the time zone in the tooltip.
This commit is contained in:
Marcus Andersson
2020-05-13 07:26:03 +02:00
committed by GitHub
parent 2d19c046f2
commit cab066f8ce
3 changed files with 31 additions and 9 deletions
@@ -1,5 +1,18 @@
// List taken from https://stackoverflow.com/questions/38399465/how-to-get-list-of-all-timezones-in-javascript
import { TimeZone } from '../types';
import { getTimeZone } from './common';
export const timeZoneFormatUserFriendly = (timeZone: TimeZone | undefined) => {
switch (getTimeZone({ timeZone })) {
case 'browser':
return 'Local browser time';
case 'utc':
return 'UTC';
default:
return timeZone;
}
};
// List taken from https://stackoverflow.com/questions/38399465/how-to-get-list-of-all-timezones-in-javascript
export const getTimeZoneGroups = () => {
const europeZones = [
'Europe/Amsterdam',