patternfly / patternfly/patternfly-react
DatePicker: specify time zone for today's date (current)
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 862
- Forks
- 392
- Ø Merge
- 4 T. 8 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
Describe the enhancement or change
We propose adding a property to the DatePicker (and CalendarMonth) components to specify the time zone to be applied when determining today's date.
Details
In our application, users can specify the time zone they are working in.
For instance, a user located in the PST time zone may collaborate with users in the UK and choose to use the UTC time zone within the application.
If the user sets the time zone to UTC (01:02, 21 November), the application may still highlight the 20th because it reflects the local date based on the user's computer settings rather than the selected UTC time zone (17:02, 20 November).
When the user changes their computer’s clock to UTC, then the today's date is updated to the 21st as expected.
Is this request originating from a Red Hat product team? If so, which ones and is there any sort of deadline for this enhancement?
No
Any other information?
Link to hardcoded today's date: https://github.com/patternfly/patternfly-react/blob/main/packages/react-core/src/components/CalendarMonth/CalendarMonth.tsx#L122
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne bei packages/react-core/src/components/CalendarMonth/CalendarMonth.tsx in der Nähe des fest codierten heutigen Datums und verfolge anschließend, wie DatePicker und CalendarMonth den aktuellen Tag bestimmen. Lege das Verhalten der Zeitzoneneigenschaft anhand des UTC-Beispiels aus dem Issue fest und überprüfe, dass die Hervorhebung des heutigen Datums der ausgewählten Zeitzone und nicht der lokalen Einstellung des Computers folgt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react, typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100