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(datepicker): disable specified days of week #2744

Merged

Conversation

ahtshamraziq
Copy link
Contributor

@ahtshamraziq ahtshamraziq commented Sep 28, 2017

added dayDisabled prop that accepts an array of integers (0=Sunday, ..., 6=Saturday) and disables the corresponding days of the week.

@codecov
Copy link

codecov bot commented Sep 28, 2017

Codecov Report

Merging #2744 into development will decrease coverage by 0.02%.
The diff coverage is 40%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #2744      +/-   ##
===============================================
- Coverage        65.03%   65.01%   -0.03%     
===============================================
  Files              210      210              
  Lines             5691     5696       +5     
  Branches          1000     1002       +2     
===============================================
+ Hits              3701     3703       +2     
- Misses            1724     1727       +3     
  Partials           266      266
Impacted Files Coverage Δ
src/datepicker/datepicker.component.ts 63.49% <100%> (+0.58%) ⬆️
src/datepicker/datepicker-inner.component.ts 27.42% <25%> (-0.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ad82bb...b4ca275. Read the comment docs.

@ralzinov
Copy link

Anybody know is that PR would be merged?

@valorkin valorkin added this to the v2.0.0-rc.2 milestone Jan 5, 2018
@YevheniiaMazur
Copy link

tested, looks good

@valorkin valorkin merged commit 957d54b into valor-software:development Jan 18, 2018
@ghost ghost removed the ready for merge label Jan 18, 2018
@valorkin
Copy link
Member

thanks a lot! :)

@KartikShankarappa
Copy link

KartikShankarappa commented May 26, 2020

@valorkin , What if we want to disable specific dates in each month ?
For eg: I want to disable all the dates in all months and in all the years except 15th and 20th of each month.
Right now, the current version of datapicker gives us the datesEnabled and datesDisabled properties. But that would mean I will have to calculate such dates myself. Also it would force me to put a Min and Max date between which i will have to calculate the enabled and/or disabled dates.
How about a function that will help us to enable or disable specific dates ?
Something similar to this

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

Successfully merging this pull request may close these issues.

5 participants