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

Bug when changing month while/before selecting 2nd date of a range #135

Closed
JordyGit opened this issue Aug 8, 2022 · 1 comment
Closed

Comments

@JordyGit
Copy link
Contributor

JordyGit commented Aug 8, 2022

When you select a first date (as check in or check out, doesn't matter) and then change the months with the arrow buttons, the nearby dates aren't updated correctly anymore after selecting the second date of the range. Even if you go back a month after going one further. The moment you touch the months button it stops working normally.

See gif explaining this well:
BugWhenChangingMonthWhileSelectingRange

Code:

var rangePicker = new HotelDatepicker(pickerEl, {
    inline: true,
    clearButton: true,
    submitButton: true,
    topbarPosition: 'bottom',
    submitButtonName: 'name_of_submit_button',
    moveBothMonths: true,
    selectForward: false,
    startOfWeek: 'monday',
    endDate: maxDate,
    format: 'DD/MM/YYYY',
    minNights: 14,
    maxNights: 14,
    noCheckInDates: [
        "2022-08-09",
        "2022-08-10",
        "2022-08-11",
        "2022-08-12",
        "2022-08-13",
        "2022-08-14",
        "2022-08-16",
        "2022-08-17",
        "2022-08-18",
        "2022-08-19",
        "2022-08-20",
        "2022-08-21",
        "2022-08-23",
        "2022-08-24",
        "2022-08-25",
        "2022-08-26",
        "2022-08-27",
        "2022-08-28",
        "2022-08-30",
        "2022-08-31",
        "2022-09-01",
        "2022-09-02",
        "2022-09-03",
        "2022-09-04",
        "2022-09-06",
        "2022-09-07",
        "2022-09-08",
        "2022-09-09",
        "2022-09-10",
        "2022-09-11",
        "2022-09-13",
        "2022-09-14",
        "2022-09-15",
        "2022-09-16",
        "2022-09-17",
        "2022-09-18",
        "2022-09-20",
        "2022-09-21",
        "2022-09-22",
        "2022-09-23",
        "2022-09-24",
        "2022-09-25",
        "2022-09-27",
        "2022-09-28",
        "2022-09-29",
        "2022-09-30",
        "2022-10-01",
        "2022-10-02",
        "2022-10-04",
        "2022-10-05",
        "2022-10-06",
        "2022-10-07",
        "2022-10-08",
        "2022-10-09",
        "2022-10-11",
        "2022-10-12",
        "2022-10-13",
        "2022-10-14",
        "2022-10-15",
        "2022-10-16",
        "2022-10-18",
        "2022-10-19",
        "2022-10-20",
        "2022-10-21",
        "2022-10-22",
        "2022-10-23",
        "2022-10-25",
        "2022-10-26",
        "2022-10-27",
        "2022-10-28",
        "2022-10-29",
        "2022-10-30",
        "2022-11-01",
        "2022-11-02",
        "2022-11-03",
        "2022-11-04",
        "2022-11-05",
        "2022-11-06",
        "2022-11-08",
        "2022-11-09",
        "2022-11-10",
        "2022-11-11",
        "2022-11-12",
        "2022-11-13",
        "2022-11-15",
        "2022-11-16",
        "2022-11-17",
        "2022-11-18",
        "2022-11-19",
        "2022-11-20",
        "2022-11-22",
        "2022-11-23",
        "2022-11-24",
        "2022-11-25",
        "2022-11-26",
        "2022-11-27",
        "2022-11-29",
        "2022-11-30",
        "2022-12-01",
        "2022-12-02",
        "2022-12-03",
        "2022-12-04",
        "2022-12-06",
        "2022-12-07",
        "2022-12-08",
        "2022-12-09",
        "2022-12-10",
        "2022-12-11",
        "2022-12-13",
        "2022-12-14",
        "2022-12-15",
        "2022-12-16",
        "2022-12-17",
        "2022-12-18",
        "2022-12-20",
        "2022-12-21",
        "2022-12-22",
        "2022-12-23",
        "2022-12-24",
        "2022-12-25",
        "2022-12-27",
        "2022-12-28",
        "2022-12-29",
        "2022-12-30",
        "2022-12-31"
    ],
    noCheckOutDates: [
        "2022-08-09",
        "2022-08-10",
        "2022-08-11",
        "2022-08-12",
        "2022-08-13",
        "2022-08-14",
        "2022-08-16",
        "2022-08-17",
        "2022-08-18",
        "2022-08-19",
        "2022-08-20",
        "2022-08-21",
        "2022-08-23",
        "2022-08-24",
        "2022-08-25",
        "2022-08-26",
        "2022-08-27",
        "2022-08-28",
        "2022-08-30",
        "2022-08-31",
        "2022-09-01",
        "2022-09-02",
        "2022-09-03",
        "2022-09-04",
        "2022-09-06",
        "2022-09-07",
        "2022-09-08",
        "2022-09-09",
        "2022-09-10",
        "2022-09-11",
        "2022-09-13",
        "2022-09-14",
        "2022-09-15",
        "2022-09-16",
        "2022-09-17",
        "2022-09-18",
        "2022-09-20",
        "2022-09-21",
        "2022-09-22",
        "2022-09-23",
        "2022-09-24",
        "2022-09-25",
        "2022-09-27",
        "2022-09-28",
        "2022-09-29",
        "2022-09-30",
        "2022-10-01",
        "2022-10-02",
        "2022-10-04",
        "2022-10-05",
        "2022-10-06",
        "2022-10-07",
        "2022-10-08",
        "2022-10-09",
        "2022-10-11",
        "2022-10-12",
        "2022-10-13",
        "2022-10-14",
        "2022-10-15",
        "2022-10-16",
        "2022-10-18",
        "2022-10-19",
        "2022-10-20",
        "2022-10-21",
        "2022-10-22",
        "2022-10-23",
        "2022-10-25",
        "2022-10-26",
        "2022-10-27",
        "2022-10-28",
        "2022-10-29",
        "2022-10-30",
        "2022-11-01",
        "2022-11-02",
        "2022-11-03",
        "2022-11-04",
        "2022-11-05",
        "2022-11-06",
        "2022-11-08",
        "2022-11-09",
        "2022-11-10",
        "2022-11-11",
        "2022-11-12",
        "2022-11-13",
        "2022-11-15",
        "2022-11-16",
        "2022-11-17",
        "2022-11-18",
        "2022-11-19",
        "2022-11-20",
        "2022-11-22",
        "2022-11-23",
        "2022-11-24",
        "2022-11-25",
        "2022-11-26",
        "2022-11-27",
        "2022-11-29",
        "2022-11-30",
        "2022-12-01",
        "2022-12-02",
        "2022-12-03",
        "2022-12-04",
        "2022-12-06",
        "2022-12-07",
        "2022-12-08",
        "2022-12-09",
        "2022-12-10",
        "2022-12-11",
        "2022-12-13",
        "2022-12-14",
        "2022-12-15",
        "2022-12-16",
        "2022-12-17",
        "2022-12-18",
        "2022-12-20",
        "2022-12-21",
        "2022-12-22",
        "2022-12-23",
        "2022-12-24",
        "2022-12-25",
        "2022-12-27",
        "2022-12-28",
        "2022-12-29",
        "2022-12-30",
        "2022-12-31"
    ] 
});
@benitolopez
Copy link
Owner

Fixed in 781fb57

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

2 participants