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

Date highlighted ranges display breaks if earlier date inserted in array after later date. #60

Closed
iiezhachenko opened this issue Aug 9, 2015 · 3 comments

Comments

@iiezhachenko
Copy link

Initial data and result

screen shot 2015-08-09 at 6 28 41 pm

dateRanges: [{
        state: "enquire",
        range: moment.range(
            moment().add(2, "weeks").subtract(5, "days"),
            moment().add(2, "weeks").add(6, "days")
        )
    },
    {
        state: "unavailable",
        range: moment.range(
            moment().add(3, "weeks"),
            moment().add(3, "weeks").add(5, "days")
        )
    }
  ]

Data and result after modification

screen shot 2015-08-09 at 6 30 06 pm

dateRanges: [{
        state: "enquire",
        range: moment.range(
            moment().add(2, "weeks").subtract(5, "days"),
            moment().add(2, "weeks").add(6, "days")
        )
    },
    {
        state: "unavailable",
        range: moment.range(
            moment().add(3, "weeks"),
            moment().add(3, "weeks").add(5, "days")
        )
    },
    {
        state: "unavailable",
        range: moment.range(
            moment().add(3, "days"),
            moment().add(5, "days")
        )
    }
  ]
@miracle2k
Copy link

See my comment in #57 for why this is.

@iiezhachenko
Copy link
Author

Thank you.

@TimBeyer
Copy link

TimBeyer commented Mar 6, 2016

It doesn't seem like this has ever been fixed. I think it should be reopened @iiezhachenko.
In my opinion, the calendar should sort those ranges.

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

No branches or pull requests

3 participants