React-day-picker: Navigating back to the current date from DayPickerInput

Created on 22 Feb 2018  路  2Comments  路  Source: gpbl/react-day-picker

Hi,

I'm looking for a way to allow my users to click a button inside the day picker to go (back to) the current date. Right now, they can navigate back a few years in time to filter the record on that date. Now there is a new requirement where users must be able to click a button to return to the current date.

I see a todayButton prop in the DayPicker component, but can't find it for DayPickerInput.

Is there anything available right now that allows this in the DayPickerInput? I've looked through the docs but I haven't found any way to extend the picker input.

I'm using DayPickerInput from version 7.0.5.

Most helpful comment

There's a dayPickerProps you can use to pass the DayPicker props to it:

<DayPickerInput dayPickerProps={{ todayButton: 'today' }} />

Does it solve your task?

All 2 comments

There's a dayPickerProps you can use to pass the DayPicker props to it:

<DayPickerInput dayPickerProps={{ todayButton: 'today' }} />

Does it solve your task?

Can't believe I missed that, thank you so much. Sorry for wasting your time.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trevordmiller picture trevordmiller  路  4Comments

matfork-belatrix picture matfork-belatrix  路  5Comments

michaelgriffithus picture michaelgriffithus  路  5Comments

vulcanoidlogic picture vulcanoidlogic  路  6Comments

magnusohlin picture magnusohlin  路  4Comments