patternfly / patternfly/patternfly-react

DatePicker: specify time zone for today's date (current)

Aperta
#11,273 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Stale
Lingua principale
TypeScript
Stelle
862
Fork
392
Merge medio
4g 8h
PR unite (30g)
9

Descrizione

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).

Image

When the user changes their computer’s clock to UTC, then the today's date is updated to the 21st as expected.

Image

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia da packages/react-core/src/components/CalendarMonth/CalendarMonth.tsx, intorno alla data odierna hardcoded, quindi segui il modo in cui DatePicker e CalendarMonth determinano il giorno corrente. Definisci il comportamento della proprietà del fuso orario in base all’esempio UTC dell’issue e verifica che l’evidenziazione della data odierna segua il fuso orario selezionato invece dell’impostazione locale del computer.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
react, typescript
Ambito
frontend
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.