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

[feat] QDate: Disabled dates in years and months view #6639

Open
stefanvanherwijnen opened this issue Mar 19, 2020 · 3 comments
Open

[feat] QDate: Disabled dates in years and months view #6639

stefanvanherwijnen opened this issue Mar 19, 2020 · 3 comments

Comments

@stefanvanherwijnen
Copy link
Contributor

https://codepen.io/stefanvh/pen/mdJjdNJ

When disabling dates with the options attribute, only the days in the days view are affected. Functionality wise this is all that is required, but it would be nice if the years and months with only disabled days would also be disabled (without having too much of an impact on the performance of QDate).

@mabele98
Copy link

I was able to recreate this issue. Working on adding the feature.

mabele98 pushed a commit to mabele98/quasar that referenced this issue Apr 13, 2020
To disable months and years that do not contain available dates
that are found in users options prop.

BREAKING CHANGE: Referencing QDate.js file

Added two computed functions called "years () " and "months ()"
Functions return a list of boolean values to represent years/months
A year/month is true if it should be disabled, false otherwise.

Changed __getMonthsView to map through computed months

Changed __getYearsView to map through computed years

If either month or year is disabled, a label is used rather than button.
mabele98 pushed a commit to mabele98/quasar that referenced this issue Apr 13, 2020
To disable months and years that do not contain available dates
that are found in users options prop.

BREAKING CHANGE: Referencing QDate.js file

Added two computed functions called "years () " and "months ()"
Functions return a list of boolean values to represent years/months
A year/month is true if it should be disabled, false otherwise.

Changed __getMonthsView to map through computed months

Changed __getYearsView to map through computed years

If either month or year is disabled, a label is used rather than button.
@bernard-uerm
Copy link

bernard-uerm commented Jan 17, 2021

Hi, do we have update on this? If the devs are still working on this, do we have a workaround on this? thanks

@Giildo
Copy link
Contributor

Giildo commented Feb 28, 2023

Hello, still no release for this modification?

EDIT: I'm just finding the options to fix the problem:

  • navigation-min-year-month
  • navigation-max-year-month

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

No branches or pull requests

4 participants