Giter Site home page Giter Site logo

Comments (7)

benitolopez avatar benitolopez commented on May 23, 2024 2

Just use your variable on the disabledDates option:

hdpkr = new HotelDatepicker(input, {
	format: 'DD-MM-YYYY',
	autoClose: false,
	disabledDates: yourDynamicArrayHere
});

from hotel-datepicker.

benitolopez avatar benitolopez commented on May 23, 2024 1

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.

benitolopez avatar benitolopez commented on May 23, 2024 1

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.

omguddu100 avatar omguddu100 commented on May 23, 2024

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.

omguddu100 avatar omguddu100 commented on May 23, 2024

thanks for reply

from hotel-datepicker.

omguddu100 avatar omguddu100 commented on May 23, 2024

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
dats
----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.

Rivaldo35 avatar Rivaldo35 commented on May 23, 2024

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)

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.