Giter Club home page Giter Club logo

Comments (3)

hoangnguyen291 avatar hoangnguyen291 commented on September 3, 2024

Currently I have fixed this problem by modify Day.vue disableNextDays()

  disableNextDays(){
      if ( !this.isDateLessOrEquals(this.date, this.nextDisabledDate)
            && this.nextDisabledDate !== Infinity) {
              this.isDisabled = true;
      }
      else if ( this.isDateLessOrEquals(this.date, this.checkIn) ) {
        this.isDisabled = true;
      }
      if ( this.compareDay(this.date, this.checkIn) == 0 && this.options.minNights == 0) {
        this.isDisabled = false;
      }
      if (this.isDateLessOrEquals(this.checkIn, this.date) && this.options.enableCheckout ){
          this.isDisabled = false;
      }
      else {
          let enableDate = this.sortedDisabledDates.find(p => p > this.checkIn);
          let lastDisableDate = this.sortedDisabledDates.find(p => p < this.date && p > this.checkIn);
          if (this.compareDay(this.date, this.checkIn) == 1 && this.compareDay(this.date, enableDate)==0) {
              this.isDisabled = false;
          }
          if (lastDisableDate) {
              this.isDisabled = true;
          }
          return
      }
    },

from vue-hotel-datepicker.

amulchinock avatar amulchinock commented on September 3, 2024

@hoangnguyen291 Are you suggesting that we allow checkin/checkout on the same date?

For example- your "hotel" has a check out at 10am on 01/01/1970, and another guest wishes to check in at 3pm on 01/01/1970.

At the moment, the datepicker doesn't specify date/times for the threshold of date cutoff. This means, if you block out a date as disabled (due to an existing booking), then there is no way for the user to check in on that date.

Feel free to make a pull request based on your code.

@krystalcampioni feature request? :)

from vue-hotel-datepicker.

matiasperrone avatar matiasperrone commented on September 3, 2024

Merged with #74

from vue-hotel-datepicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.