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

Allow empty date on initialize #309

Open
oanacrisan opened this issue Mar 6, 2018 · 1 comment
Open

Allow empty date on initialize #309

oanacrisan opened this issue Mar 6, 2018 · 1 comment

Comments

@oanacrisan
Copy link

oanacrisan commented Mar 6, 2018

I'd like to have the possibility to not set an initial date value, but still have the datepicker set to current month when I click on the input to open it. Otherwise, if the date is null, the days are not displayed. And the reason I do not want to set the date with new Date() on initializing is that I do not want the date (of today) displayed in the input, I'd prefer for the input to be populated only after the date is selected.

Maybe in init method have something like this:
const start = startOfMonth(this.date || new Date()); and const end = endOfMonth(this.date || new Date()); so that days get computed even if date is not set.

empty datepicker

@Manzurkds
Copy link

I have fixed the issue with the pull request #312.
If you are in hurry and can't wait for the pull request to be accepted , you can make a build from the forked repo in my account

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

2 participants