Giter Site home page Giter Site logo

Comments (12)

Cristiano81 avatar Cristiano81 commented on May 26, 2024 1

from hotel-datepicker.

benitolopez avatar benitolopez commented on May 26, 2024

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.

omguddu100 avatar omguddu100 commented on May 26, 2024

can You plz help me
image

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();
       
    });`

image
input.parentElement is getting null

from hotel-datepicker.

benitolopez avatar benitolopez commented on May 26, 2024

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.

omguddu100 avatar omguddu100 commented on May 26, 2024

Yes Sir i using correct id,
image
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
image

I don't know it will make conflict or not others codes in future.

from hotel-datepicker.

benitolopez avatar benitolopez commented on May 26, 2024

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.

omguddu100 avatar omguddu100 commented on May 26, 2024

@Cristiano81 . No, when i initialization inside document ready function, then it not working so I initialize without document ready function . Thanks

from hotel-datepicker.

omguddu100 avatar omguddu100 commented on May 26, 2024

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.

Cristiano81 avatar Cristiano81 commented on May 26, 2024

from hotel-datepicker.

omguddu100 avatar omguddu100 commented on May 26, 2024

@Cristiano81 datepicker not showing & getting thing
image

from hotel-datepicker.

Cristiano81 avatar Cristiano81 commented on May 26, 2024

from hotel-datepicker.

omguddu100 avatar omguddu100 commented on May 26, 2024

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)

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.