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 some useful date utilities #76

Closed
gpbl opened this issue Oct 16, 2015 · 6 comments
Closed

Expose some useful date utilities #76

gpbl opened this issue Oct 16, 2015 · 6 comments

Comments

@gpbl
Copy link
Owner

gpbl commented Oct 16, 2015

The idea is to export some of the internal functions that could be useful when writing modifiers:

import DayPicker, { DateUtils } from "react-day-picker"

e.g. isSomeDay (#75), rangeOfDays (#47), isDayOutsideMonth, isPastDay, isDayBetween, etc.

@gnrlbzik
Copy link

👍

@bvaughn
Copy link

bvaughn commented Nov 3, 2015

👍 The examples make use of isPastDay and isSameDay. Those would be nice to have access to (even though their implementation is simple enough to fork).

@gpbl gpbl closed this as completed in f555948 Nov 6, 2015
gpbl added a commit that referenced this issue Nov 6, 2015
@gnrlbzik
Copy link

gnrlbzik commented Nov 6, 2015

So are these exposed now as well, or I am missing something, i just saw rename utils>helpers

@gpbl
Copy link
Owner Author

gpbl commented Nov 6, 2015

Eheh wait first I had to publish the thing 😀
I could extract some functions and expose them in v1.1.0:

import { dateUtils } from "react-day-picker/utils";

the exported functions are not yet documented, but you can see them here.

@gnrlbzik
Copy link

gnrlbzik commented Nov 6, 2015

@gpbl thank you so much. I will be looking forward to it. Will update our component and add locale support.

@bvaughn
Copy link

bvaughn commented Nov 6, 2015

Thanks for the quick update. :) Much appreciated!

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

No branches or pull requests

3 participants