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

Customized date groups #91

Merged

Conversation

sikandartariq1
Copy link
Contributor

No description provided.

@sikandartariq1 sikandartariq1 mentioned this pull request Mar 21, 2019
dev/App.vue Outdated
@@ -91,6 +91,8 @@
:date-one="inlineDateOne"
:months-to-show="2"
:disabled-dates="['2018-04-30', '2018-05-10', '2018-12-14']"
:customized-dates="[['2019-03-21', '2019-03-22', '2019-03-23'], ['2019-03-21', '2019-03-22', '2019-03-23']]"
:customized-groups="['booked', 'not-available']"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MikaelEdebro not sure if this is the best approach (using two arrays for one purpose)... Hash maybe?
customized-dates="['booked': ['2019-03-21', '2019-03-22', '2019-03-23'], 'not-available': ['2019-03-21', '2019-03-22', '2019-03-23']]

@MikaelEdebro
Copy link
Owner

I think it's best to use:

:customized-dates="[
  {
    dates: ['2019-03-21', '2019-03-22', '2019-03-23'],
    cssClass: 'booked'
  },
  {
    dates: ['2019-03-29', '2019-03-30'],
    cssClass: 'not-available'
  },
]"

That way we only need one property, and it's really clear what class to add to the specified dates.

@sikandartariq1
Copy link
Contributor Author

perfect!

@sikandartariq1
Copy link
Contributor Author

Updated!! Please take a look @MikaelEdebro

@MikaelEdebro
Copy link
Owner

Hi! Sorry for the delay. Have been really busy with work and other stuff. :)

I'll have a look at this in the upcoming days. I'll just have to pull the branch and test locally, and write some docs in the readme.

@sikandartariq1
Copy link
Contributor Author

No problem! Let me know if I can help with something

@MikaelEdebro
Copy link
Owner

MikaelEdebro commented Mar 27, 2019

@sikandartariq1 It would be great if you can document this in https://github.com/MikaelEdebro/vue-airbnb-style-datepicker/blob/master/docs/INSTALLATION.md#props-and-events
And also add this prop to the "all examples" below the table.

@MikaelEdebro MikaelEdebro merged commit 643acea into MikaelEdebro:master Mar 30, 2019
@MikaelEdebro
Copy link
Owner

Thanks for the contribution. This is now released in https://github.com/MikaelEdebro/vue-airbnb-style-datepicker/releases/tag/v2.6.0

@sikandartariq1
Copy link
Contributor Author

Cool, 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.

None yet

2 participants