Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose modifier utility function to consumer #309

Merged
merged 1 commit into from
Apr 26, 2017
Merged

expose modifier utility function to consumer #309

merged 1 commit into from
Apr 26, 2017

Conversation

cwmoo740
Copy link
Contributor

Great library, by the way.

I'm working on a project that needs to validate dates based on these modifiers (user can either type into a text box, or use the react-day-picker). It would be nice if I could import a function that lets me validate if a react-day-picker modifier applies to a given date.

This is one proposal here - it doesn't add very much code, just shrinks the Helpers.js and splits up getModifiersForDay into two functions.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling ab2b4c9 on cwmoo740:master into d12c4af on gpbl:master.

@gpbl gpbl merged commit e24372e into gpbl:master Apr 26, 2017
@gpbl
Copy link
Owner

gpbl commented Apr 26, 2017

This is great, thanks! I was thinking to something similar 👍

@gpbl
Copy link
Owner

gpbl commented Apr 26, 2017

Releasing this later in few hours :)

@gpbl
Copy link
Owner

gpbl commented Apr 29, 2017

(I meant "few hours" as here in Peru, where it means days later 😆)

Actually I was in the middle of moving to CircleCI, and I've had to add the docs (see here).

The utilities are published in v5.4.0, please note that the file is called ModifiersUtils (with Modifiers, plural) instead of ModifierUtils (singular).

Please report back if something is not working as expected, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants