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

Feature request: hide disabled hours, except range #136

Open
jerearaujo03 opened this issue Oct 21, 2020 · 0 comments
Open

Feature request: hide disabled hours, except range #136

jerearaujo03 opened this issue Oct 21, 2020 · 0 comments
Labels
💡 feature request Feature requests ⏳ roadmap Added in TODO stack

Comments

@jerearaujo03
Copy link

jerearaujo03 commented Oct 21, 2020

I have a use case where the user have to select an hour from the business open hours (between 7 and 16 hs).

<vue-timepicker v-model="time"
    :hour-range="[[7,16]]" hide-disabled-hours
>
</vue-timepicker>

I'm using hide-disabled-hours to hide the hours the business is closed (0-6 and 17-23).

Now I want to disabled taken hours, for example when there is a reservation, let's say at 10 hs. Now, because I'm using hide-disabled-hours it doesn't show the hour 10, it jumps from 9 to 11.
If I want to show the 10 as disabled, I need to remove hide-disabled-hours, but it causes the time picker show 0, 1, 2, 3, 4, 5, 6 at the top, disabled.

It would be great if I can define an hide-disabled-hours-range, that hide disabled hours that are only in this range.
So in my case, that I want to show disabled hours only between 7 and 16 hs. the code would be:

<vue-timepicker v-model="time"
    :hour-range="[[7,16]]" hide-disabled-hours
    :hide-disabled-hours-range="[[0,7],[17,23]]"
>
</vue-timepicker>```

This only would hide the disabled hours between the range [[0,6],[17,23]], showing the rest (between 7 and 16)

@phoenixwong phoenixwong added the 💡 feature request Feature requests label Oct 25, 2020
@phoenixwong phoenixwong added the ⏳ roadmap Added in TODO stack label Dec 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 feature request Feature requests ⏳ roadmap Added in TODO stack
Projects
None yet
Development

No branches or pull requests

2 participants