Calendar disabled from parameter is off-by-one

Open Beginner friendly
#3,969 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript
Domain
mobile

Research direction

Start with the Calendar date-range documentation demo at https://framework7.io/docs/calendar#date-range and reproduce the behavior using disabled: { from: today, to: weekLater }. Trace the Calendar date-disabling logic from that example; done means the configured start date, today, is disabled as the example indicates.

Written by the indexing model from the issue text.

Description

Describe the bug

Take a look at the demo at:
https://framework7.io/docs/calendar#date-range
The "Disabled Dates" field is backed by code that says:

disabled: {
  from: today,
  to: weekLater
}

However, in the demo, today is enabled, and only tomorrow begins the disabled dates. So it looks like an off-by-one bug.

Dominant language
JavaScript
Stars
18.8k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from framework7io/framework7

All issues in framework7io/framework7

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.