Datepicker middle navigation button disabled for minDate Month
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
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Inizia con il componente Datepicker e la sua funzione isDateInRange(), quindi riproduci il comportamento nella story Datepicker di Flowbite Storybook. Il lavoro è completato quando il pulsante dell’header consente di spostarsi a un mese contenente minDate o maxDate, anche quando entrambi i limiti rientrano nello stesso mese.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
- I have searched the Issues to see if this bug has already been reported
- I have tested the latest version
Steps to reproduce
- Go to the Datepicker component and set minDate={new Date()} as the current date. The maxDate can be any date in the following month.
- If your minDate is set to any day other than the first of the month, when you switch to the month view, the month containing your minDate will be disabled.
The issue seems to stem from the isDateInRange() function, which considers newDate as the first day of the month. This function should be split into two: one for days and another for months, years, and decades. While the current function works fine for day selection, it should be slightly modified for months, years, and decades to allow navigation and selection even if minDate or maxDate falls within the same month.
Current behavior
When minDate is set to any day other than the first of the month, the month button is disabled when navigating back to that month.
Expected behavior
The header button should allow navigation to the month containing the minDate.
Context
The desired functionality is to enable navigation to the month where minDate is set, even if it isn't the first of the month. Additionally, if both minDate and maxDate are within the same month, the button should still allow navigation to that month. Currently, when using the change view button, the month becomes disabled, and the user is forced to shift to the next month if maxDate is in the future.
Here is a short video of me on Flowbite Storybook's Datepicker story, showing the issue when trying to click the button with no response:
https://github.com/user-attachments/assets/08e3e153-24bc-4853-a35d-5503c392045d
- Lingua principale
- TypeScript
- Stelle
- 2.2k
- Fork
- 504
- Merge medio
- 19h 16m
- PR unite (30g)
- 2
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di themesberg/flowbite-react
-
fix(Carousel): can't give dynamic children to CarouselForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta:bug: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
themesberg/flowbite-react#1469 · 1 commento ·
-
Pagination is broken if there is only one pageForse già presa @Mukilan1600 l’ha presa 1021 giorni fa. Aperta:bug: bug confirmed good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
themesberg/flowbite-react#1048 · 7 commenti · 1 reazione ·
-
:books: documentation help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
themesberg/flowbite-react#1696 · 2 commenti ·
-
Add a QRCode componentAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
themesberg/flowbite-react#1693 ·
-
NavbarCollapse closes when toggling a MegaMenuDropdown on mobileForse di nuovo libera @sarthak-11231 l’ha presa 45 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
themesberg/flowbite-react#1686 · 2 commenti ·
Tutte le issue di themesberg/flowbite-react
Issue simili
-
area:frontend kind:bug priority:p2 ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
handsontable/hyperformula#1879 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
RunestoneInteractive/rs#1661 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
capricorn86/happy-dom#2594 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno