pushtell / react-bootstrap-date-picker

React-Bootstrap based date picker.
MIT License
347 stars 195 forks source link

Adding new property todayDate #111

Open gReis89 opened 7 years ago

gReis89 commented 7 years ago

Description

Is it useful to have a property to change the default display date on the popover component, some times, we need the popover to open on a different month or year to be closer to a specific date range.

Motivation and Context

I'm using the component to select some dates in the past, 3 or 4 years in the past, in those cases, it is painful to navigate between years every time. Changing the todayDate we can make it easier.

How Has This Been Tested?

Tests were made in browser through UI. Tested on MacOS Sierra, Chrome 57.0.2987.98 (64-bit)

Screenshots:

screen shot 2017-04-12 at 16 21 12 screen shot 2017-04-12 at 16 21 18

Types of changes

Checklist:

tests were already failing

wehriam commented 7 years ago

Hi @gReis89 - thanks for the PR! Please review the conflicts when you have a chance.

gReis89 commented 7 years ago

@wehriam conflicts solved, have added unit testing, but some existing are still not passing

wehriam commented 7 years ago

Hi @gReis89 - All tests are passing on master.

I merged in https://github.com/pushtell/react-bootstrap-date-picker/pull/124 which seems to have created some additional conflicts.

Can you pull from the most recent version, make sure your dependencies are up to date, and try again?

gReis89 commented 6 years ago

Hey @wehriam!

Branch updated with pushtell/master, conflicts are solved out and tests are working now. I had to add a default a dataFormat property to one of the tests due to different date formats around the globe(mine is "DD/MM/YYYY" and tests were matching for "MM/DD/YYYY")

Is that possible to release this PR in any moment soon? planing to use it on my next sprint, thanks!