Comments (7)
Just use your variable on the disabledDates option:
hdpkr = new HotelDatepicker(input, {
format: 'DD-MM-YYYY',
autoClose: false,
disabledDates: yourDynamicArrayHere
});
from hotel-datepicker.
You need to pass an array of strings.
hdpkr = new HotelDatepicker(input, {
format: 'DD-MM-YYYY',
autoClose: false,
disabledDates: [
'2017-09-27',
'2017-09-23',
'2017-09-26',
'2017-09-28',
'2017-10-01',
'2017-10-11'
]
});
I will update the readme with an example to avoid any confusion.
from hotel-datepicker.
Hi,
I don't provide support for custom requests. Please use this repo to report bugs only. Use stackoverflow.com for other questions.
from hotel-datepicker.
Thanks sir.
I have one doubt also plz help to fixed it.
how to pass the disabledDates as a dynamic.
I mean disabledDates[] arguments from outside HotelDatepicker method like.
//i want this dates pass like that
disabledDates: [
'2017-09-27',
'2017-09-23',
'2017-09-26',
'2017-09-28',
'2017-10-01',
'2017-10-11'
]
hdpkr = new HotelDatepicker(input, {
format: 'DD-MM-YYYY',
autoClose: false,
//what i write here..
});
hdpkr.open();
});
from hotel-datepicker.
thanks for reply
from hotel-datepicker.
Hi Sir,
How to get start-day and end-day dates in two separate in table cell.
please help me to fix this issue
I want like that
----html----
`
<table class="table">
<thead>
<tr>
<th>Start Dats</th>
<th>Start Dats</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>DD-MM-YYY</td>
<td>DD-MM-YYY</td>
<td><button class="btn btn-success">Add to cart</button></td>
</tr>
</tbody>
-----js-------
var hdpkr;
$(document).ready(function () {
var dynamicdates = [
'2017-09-27',
'2017-09-23',
'2017-09-26',
'2017-09-28',
'2017-10-01',
'2017-10-11'
]
var input = document.getElementById('ppzdate');
hdpkr = new HotelDatepicker(input, {
format: 'DD-MM-YYYY',
autoClose: false,
disabledDates: dynamicdates
});
hdpkr.open();
});
from hotel-datepicker.
help here bro. how are you?
i want to pass a json array with dates to disable in the datepicker. i did it but once i click one a date, the disabled dates get enabled. can you help?
from hotel-datepicker.
Related Issues (20)
- Feature request: Ajax loading or API methods HOT 2
- clearButton does not display in topBar when clearButton: true and showTopbar: true HOT 3
- Which Date Format Should I Have to Use for setRange
- Display price below each date HOT 2
- Feature request - getRange(d1, d2) HOT 1
- disabledDates not working HOT 2
- tabindex on parent element breaks datepicker HOT 2
- When using extraDayText, can't select date by clicking on extra text (bug?) HOT 5
- Flexible minNights HOT 1
- When select the dates from the picker need to assign both check-in and check-out dates separately to another input field values HOT 1
- Small Questions HOT 2
- Feature request: minNights depending on a certain timeframe HOT 2
- Add disabled dates after initialize, and preload date range from session storage HOT 2
- Unexpected getNights() result HOT 2
- Date format HOT 1
- Calendar display in mobile HOT 2
- Datepicker hangs at height:0 HOT 3
- Bug: Close button after clean or deselecting disabled HOT 5
- Missing dot for class in scss file HOT 2
- Unexpected behavior: setRange HOT 1
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 hotel-datepicker.