Javacript Options

The Staylists Javascript options object can accept the following options:

Property Value Type Value
host string Your custom booking subdomain, although you can use for testing.
path string the path to the page or resource you want to embed.
target string ID of an HTML element you want to inject the iframe into.
bookable integer or string the ID or IDs of the rooms you wish to show (multiple IDs must be declared as a comma separated string)
force_calendar boolean set to true if you'd like to show availability calendars instead of the default view
ga string The UA code of your Google Analytics account
start_date string a DD/MM/YYYY formatted string that sets the Enquiry start date
nights integer the number of nights that sets the Enquiry
console_debug boolean set to true to see information output the browser console
listing string the Staylists reference of the property you are trying to display
enquiry string the ID of a particular Enquiry you wish to display
locale string use this to force a language change (you'll need to configure accepted locales in your Staylists account)
adults string set the default number of adults for the Enquiry
infants string set the default number of infants for the Enquiry
children string set the default number of children for the Enquiry
child_ages array set the child ages
dogs string set the default number of dogs for the Enquiry

So you could set the start date and nights using your own UI and pass them to the script:

    host: '',
    enquiry: 'new',
    listing: 'demobb',
    start_date: '14/04/2020',
    nights: 2