question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[calendar] disabledDates on month mode/type

See original GitHub issue

Help Wanted

Is any way set disabledDates on calendar in month mode?

Problem

I’ve tried set:

type: "month",
disabledDates: [{date: new Date("2019-04"), message: "Some message"},{date: new Date("2019-05-01"), message: "Some other message"}]

But it didn’t work, when i switch type to day it woks fine 😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
szalonnacommented, Oct 11, 2019

I started to implement this but I have a question in related to the months. In opposite of years and dates, months are repeating. In dates there is the disabledDaysOfWeek for disabling repeated days on weekly basis, but what happens if the user set e.g. the month to a specific date or a number?

Possible implementations:

  1. Mix repetitive and non-repetitive disable as:
  • if the month is a date, disable only that specific month
  • if the month is a number, disable that month in every year
  1. Split them in two different properties (like disabledDaysOfWeek)
  • in disabledDates if the month is a date, disable that specific month and only accept dates and date strings
  • introduce a new option as disabledMonthsOfYear, with which you can define the disabled months in a yearly basis
0reactions
prudhocommented, Feb 18, 2020

Implemented by #1330.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable Dates | V-Calendar
Disabling dates are now supported for v-calendar as well. ... If using min-date navigation is disabled for months before specified date; If using...
Read more >
Calendar disable dates from next month - Stack Overflow
I am using JQuery to block some dates but ...
Read more >
HTML DOM Input Date disabled Property - W3Schools
The disabled property sets or returns whether a date field should be disabled, or not. A disabled element is unusable and un-clickable.
Read more >
How to disable the dates in calender field in servicenow
Hi PADMA,. There's no easy way to disable dates on OOTB calendar. Would have to create a custom calendar widget if that feature...
Read more >
ion-datetime
Datetimes present a calendar interface and time wheel, making it easy for users to select ... The following example shows how to disable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found