Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Improved DatePickerRange #221

Merged
merged 7 commits into from
Jul 12, 2018
Merged

Improved DatePickerRange #221

merged 7 commits into from
Jul 12, 2018

Conversation

valentijnnieman
Copy link
Contributor

This improves the DatePickerRange component, with bugfixes for #209 and #152 .

Changes the onDateChange function to test if provided new dates are
different. Closes #209.
The updatemode prop can be 'singledate' or 'bothdates' to specify if you
want the callback (setProps) to trigger when selecting one date or when
you have selected both (start and end) dates. Wasn't able to write
integration test. Closes #152.
This tests if 'bothupdates' as 'updatemode' only triggers after updating
both dates.
@valentijnnieman valentijnnieman changed the title Improved datepicker Improved DatePickerRange Jun 29, 2018
Added a .click() to lose focus of element, hopefully thereby triggering
the callback to fire.
@willgdjones
Copy link

Looking forward to this being merged. Thanks for your work @valentijnnieman !

@willgdjones
Copy link

Any movement on this? Would be great to see this integrated asap. Thanks!

@@ -139,73 +139,6 @@
}
}
},
"src/components/Confirm.react.js": {
Copy link
Member

@bpostlethwaite bpostlethwaite Jul 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why this chunk of meta was removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is curious... I have no idea why it's there in the first place, as there's no Confirm component or anything. Could it be related to the new Confirmation modal?

Copy link
Member

@bpostlethwaite bpostlethwaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small question otherwise looks good to me
💃

CHANGELOG.md Outdated
@@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [0.23.1]
### Fixed
- Improved DatePickerRange, fixing issues #209 and 152
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make these links to the issues, i.e.:

#209 and #152

CHANGELOG.md Outdated
### Fixed
- Improved DatePickerRange, fixing issues #209 and 152

### Added
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can ⚡️ this one

* the DatePicker will update its value
* as one date is picked.
*/
updatemode: PropTypes.oneOf(['singledate', 'bothdates'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nice

@valentijnnieman valentijnnieman merged commit f96685d into master Jul 12, 2018
@valentijnnieman valentijnnieman deleted the improved_datepicker branch July 12, 2018 09:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants