iOS has wrapper around the picker when setting background colour

Aperta
#1,001 2 commenti 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
ios, javascript, react-native
Ambito
frontend, mobile

Direzione di ricerca

Start by reading the iOS implementation of the compact DateTimePicker and the package’s styling documentation; the issue gives no source file or failing test to start from. Reproduce the reported background color with the provided component props and compare how the picker renders for different date lengths. Done means the picker background appears consistent without light side areas across those date lengths.

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

Descrizione

When adding a background colour to the DateTimePicker, it is almost as if the picker itself is a separate element. I would have expected the DateTimePicker's background to be the same colour throughout, not have light parts on the sides that make it seem like there's a wrapper view around it. This also differs on the length of the input date. Any ideas on how to fix? See screenshots and code below

Image Image
<DateTimePicker
    style={SharedStyles.datePicker}
    display={Platform.OS === 'android' ? 'calendar' : 'compact'}
    textColor='#002A32'
    accentColor='#002A32'
    themeVariant="light"
    testID="dateTimePicker"
    value={date}
    mode={'date'}
    maximumDate={currentDate}
    onChange={setPickedDate}
/>

// Style
datePicker: {
    borderRadius: 10,
    backgroundColor: '#FFCF70',
    color: '#002A32',
},

// In package.json
"@react-native-community/datetimepicker": "^8.4.1",
Lingua principale
JavaScript
Stelle
2.9k
Fork
459
Merge medio
4g 16h
PR unite (30g)
5

Preparare l'ambiente

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.

Altre issue di react-native-datetimepicker/datetimepicker

Tutte le issue di react-native-datetimepicker/datetimepicker

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.