Comments (3)
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.
@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.
Merged with #74
from vue-hotel-datepicker.
Related Issues (20)
- Max nights don't work HOT 3
- Half day documentation HOT 5
- Date Format on Mobile View
- Disable the touch event for changing months HOT 4
- Custom styling HOT 3
- Scroll gesture shifts months HOT 3
- Suggestion: Show week names on mobile/tablet HOT 6
- Smooth scroll on mobile HOT 1
- disabledDaysOfWeek / disabledWeekDays page freeze when clicking the first date HOT 3
- disabledDaysOfweek doesn't work HOT 3
- Help Welcome / Ayuda Bienvenida HOT 2
- Daterange working as a modal HOT 1
- Change green color for checkin/checkout and selected date range to other color. HOT 1
- Issue when closing calendar on mobile (v3.0.10) HOT 1
- Translation error after update HOT 1
- Disabled dates issue when using halfDay after upddate HOT 2
- When Bookings are present disabled Dates are not there or partially there. HOT 6
- In Vue 3 not support HOT 1
- Is there an option setting that allows me to set the time in half an hour? HOT 1
- vue-hotel-datepicker Not Working Properly in US Region when I use it with dayjs. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-hotel-datepicker.