Comments (12)
from hotel-datepicker.
Hi,
The option sets the container of the datepicker. If you don't pass it, the parent of the input is used instead. It is useful to append the datepicker to a custom container.
Example:
var customContainer = document.getElementById('your-container');
var datepicker = new HotelDatepicker(document.getElementById('your-input'), {
container: customContainer
});
from hotel-datepicker.
I added customContainer but also getting same error
` var input1 = document.getElementById('ppzdate');
var containery = document.getElementById('yyyyy');
hdpkr = new HotelDatepicker(input1, {
format: 'DD-MM-YYYY',
autoClose: false,
container: containery,
disabledDates: dynamicdates,
});
hdpkr.open();
hdpkr.init();
});`
input.parentElement is getting null
from hotel-datepicker.
Just tried and it works. No error. Can I see your page?
That error means that your input doesn't exist. Are you using the correct ID for the input (ppzdate)?
Also, why are you calling the init()
function? That's an internal function. You should use only the open()
function.
from hotel-datepicker.
Yes Sir i using correct id,
I makes changes now code is:
`
var hdpkr;
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');
var containery = document.getElementById('yyyyy');
hdpkr = new HotelDatepicker(input, {
format: 'DD-MM-YYYY',
autoClose: false,
container: containery,
disabledDates: dynamicdates,
});
hdpkr.open();`
Note: but datepicker is showing correctly & working find also, but getting same error
I don't know it will make conflict or not others codes in future.
from hotel-datepicker.
Are you using a custom version of the plugin? Can you make your tests with the default and unmodified hotel-datepicker.js file?
And again, a real URL would be much appreciated.
from hotel-datepicker.
@Cristiano81 . No, when i initialization inside document ready function, then it not working so I initialize without document ready function . Thanks
from hotel-datepicker.
Yes sir I customized only for 'always show datepicker'. sure i will test my custom plugin with hotel-datepicker.js.
thanks for valuable support.!
from hotel-datepicker.
from hotel-datepicker.
@Cristiano81 datepicker not showing & getting thing
from hotel-datepicker.
from hotel-datepicker.
It's working on my company local machine. so not possible to share link. I trying to fix myself.
Thanks
from hotel-datepicker.
Related Issues (20)
- Is it possible to call the daterange like a modal? HOT 1
- Feature request: startDate vs default calendar page HOT 1
- Feature request: select a range with one click if nothing else is possible HOT 1
- Flexible Month display HOT 3
- Display the datepicker while clicking on parent elements HOT 1
- How to turn-off the one day notice for check-in on the same day as someone's else check-out? HOT 9
- Range allows to select after Check-In Check-out dates HOT 6
- Strange highlight on disabled dates focus? HOT 1
- Feature Request: extra text in calendar day cells HOT 2
- CSS dont apply on React 18.2.0 HOT 3
- Datepicker is invisible after disabling the input HOT 3
- Question: onSelectRange/onDayClick
- Use CSS Variables HOT 1
- select one day HOT 1
- variable minimum nights as per checkin dates HOT 1
- Is it possible to pass valuable to stateDate? HOT 1
- min_date and disabled dates HOT 2
- Feature Request HOT 6
- Feature request: Ajax loading or API methods HOT 2
- clearButton does not display in topBar when clearButton: true and showTopbar: true HOT 3
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.