react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

Custom navigation (previous, next) buttons

Open communityFabian opened this issue 4 years ago • 3 comments

Is there a way to replace those previous / next month button icons with custom icons (React.ReactNode) ?

communityFabian avatar Jul 01 '21 08:07 communityFabian

Hi @communityFabian , you should be able to achieve this by using a custom header:

https://reactdatepicker.com/#example-custom-header

samueldjones24 avatar Jul 12 '21 10:07 samueldjones24

Alternatively, you can also add custom content to the buttons using the props previousMonthButtonLabel and nextMonthButtonLabel. You'll also need to adjust the css for those buttons because the default "icons" are really just borders. (So add width and height and remove border.)

KristenWilde avatar Feb 02 '22 23:02 KristenWilde

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 13 '22 06:08 stale[bot]

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Jul 14 '24 01:07 github-actions[bot]