{"id":740,"date":"2018-07-02T11:23:47","date_gmt":"2018-07-02T11:23:47","guid":{"rendered":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking-new-new-new\/?p=740"},"modified":"2023-03-28T15:17:30","modified_gmt":"2023-03-28T15:17:30","slug":"check-min-max-duration","status":"publish","type":"post","link":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/","title":{"rendered":"Consider min\/max duration in calendar"},"content":{"rendered":"<p>By enabling the <strong>&#8220;<\/strong><strong>check m<\/strong><strong>in\/max duration&#8221; <\/strong>option in YITH &gt; Booking &gt; Settings &gt; Form Settings, the calendar in frontend will show the dates which are no longer available, including the minimum\/maximum duration.<\/p>\n<p><a href=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3780\" src=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1.png\" alt=\"Check min\/max duration\" width=\"1132\" height=\"144\" srcset=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1.png 1132w, https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1-300x38.png 300w, https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1-1024x130.png 1024w, https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1-768x98.png 768w\" sizes=\"auto, (max-width: 1132px) 100vw, 1132px\" \/><\/a><\/p>\n<h6>Example with the option enabled<\/h6>\n<p style=\"padding-left: 40px;\"><em>Customer A has booked the Amsterdam Apartment for 6 days from 3 January to 9 January. The minimum duration to book this apartment is 3 days.\u00a0<\/em><\/p>\n<p style=\"padding-left: 40px;\"><a href=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking-new-new-new\/wp-content\/uploads\/sites\/294\/2018\/07\/example-booking-not-available-calendar1.png\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1968 size-full\" src=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking-new-new-new\/wp-content\/uploads\/sites\/294\/2018\/07\/example-booking-not-available-calendar1.png\" alt=\"example booking not available calendar1\" width=\"764\" height=\"677\" srcset=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/example-booking-not-available-calendar1.png 764w, https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/example-booking-not-available-calendar1-300x266.png 300w\" sizes=\"auto, (max-width: 764px) 100vw, 764px\" \/><\/a><\/p>\n<p style=\"padding-left: 40px;\"><em>As you can see in the example above, it is not possible for Customer B to book the apartment from 1 to 9 January, considering the minimum of 3 days and the booked period.<\/em><\/p>\n<p>If you <strong>disable<\/strong> the option <strong>&#8220;Check min\/max duration&#8221;<\/strong>, the customer will see the calendar with the dates available\/unavailable, however, it does not take into consideration the minimum and maximum duration of the room. Therefore the days prior to the reservation will appear clickable in the calendar, even if the booking is not available on those dates.<\/p>\n<h6>Example with the option disabled<\/h6>\n<p style=\"padding-left: 40px;\"><em>The same scenario with customers A and B, customer A has placed a booking from 3 January to 9 January.<\/em><\/p>\n<p style=\"padding-left: 40px;\"><a href=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking-new-new-new\/wp-content\/uploads\/sites\/294\/2018\/07\/example-booking-not-available-calendar2.png\" data-rel=\"lightbox-image-2\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1969 size-full\" src=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking-new-new-new\/wp-content\/uploads\/sites\/294\/2018\/07\/example-booking-not-available-calendar2.png\" alt=\"example booking not available calendar2\" width=\"773\" height=\"678\" srcset=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/example-booking-not-available-calendar2.png 773w, https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/example-booking-not-available-calendar2-300x263.png 300w, https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/example-booking-not-available-calendar2-768x674.png 768w\" sizes=\"auto, (max-width: 773px) 100vw, 773px\" \/><\/a><\/p>\n<p style=\"padding-left: 40px;\"><em>As you can see in the example above, it is not possible for Customer B to book the apartment from 3 to 9 January. But it is possible to select 1 January in this case, as it did not consider the minimum of 3 days and the booked period.<\/em><\/p>\n<p>If the customer wants to book the room from 1 to 9 January, they will see a message notifying them that it is not possible to book this room in the period they wish.<\/p>\n<h6>Example of date not-bookable<\/h6>\n<p style=\"padding-left: 40px;\"><a href=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking-new-new-new\/wp-content\/uploads\/sites\/294\/2018\/07\/not-bookable-message3.png\" data-rel=\"lightbox-image-3\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1970 size-full\" src=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking-new-new-new\/wp-content\/uploads\/sites\/294\/2018\/07\/not-bookable-message3.png\" alt=\"not bookable message3\" width=\"776\" height=\"678\" srcset=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/not-bookable-message3.png 776w, https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/not-bookable-message3-300x262.png 300w, https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/not-bookable-message3-768x671.png 768w\" sizes=\"auto, (max-width: 776px) 100vw, 776px\" \/><\/a><\/p>\n<p style=\"padding-left: 40px;\"><em>Also, the title of the booking form changes from a price view, to &#8220;Not-bookable&#8221;.<\/em><\/p>\n<p>We suggest keeping the &#8216;<strong>Check min\/max duration<\/strong>&#8216; option enabled at all times.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By enabling the &#8220;check min\/max duration&#8221; option in YITH &gt; Booking &gt; Settings &gt; Form Settings, the calendar in frontend will show the dates which are no longer available, including the minimum\/maximum duration. Example with the option enabled Customer A has booked the Amsterdam Apartment for 6 days from 3 January to 9 January. The &hellip; <a href=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Consider min\/max duration in calendar<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,5],"tags":[],"class_list":["post-740","post","type-post","status-publish","format-standard","hentry","category-booking-duration","category-premium-version-settings"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>YITH Booking and Appointment: Consider min\/max duration in calendar<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"YITH Booking and Appointment: Consider min\/max duration in calendar\" \/>\n<meta property=\"og:description\" content=\"By enabling the &#8220;check min\/max duration&#8221; option in YITH &gt; Booking &gt; Settings &gt; Form Settings, the calendar in frontend will show the dates which are no longer available, including the minimum\/maximum duration. Example with the option enabled Customer A has booked the Amsterdam Apartment for 6 days from 3 January to 9 January. The &hellip; Continue reading Consider min\/max duration in calendar\" \/>\n<meta property=\"og:url\" content=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/\" \/>\n<meta property=\"og:site_name\" content=\"YITH WooCommerce Booking and Appointment\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-02T11:23:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-28T15:17:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1.png\" \/>\n<meta name=\"author\" content=\"Alessio Torrisi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alessio Torrisi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/\",\"url\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/\",\"name\":\"YITH Booking and Appointment: Consider min\/max duration in calendar\",\"isPartOf\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1.png\",\"datePublished\":\"2018-07-02T11:23:47+00:00\",\"dateModified\":\"2023-03-28T15:17:30+00:00\",\"author\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/#\/schema\/person\/cb8b9dbb75e34f325cc8329424e6a6c5\"},\"breadcrumb\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/#primaryimage\",\"url\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1.png\",\"contentUrl\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Consider min\/max duration in calendar\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/#website\",\"url\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/\",\"name\":\"YITH WooCommerce Booking and Appointment\",\"description\":\"Plugin documentation\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/#\/schema\/person\/cb8b9dbb75e34f325cc8329424e6a6c5\",\"name\":\"Alessio Torrisi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1dc305ade0adaba279202977d3352276?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1dc305ade0adaba279202977d3352276?s=96&d=mm&r=g\",\"caption\":\"Alessio Torrisi\"},\"url\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/author\/alessio\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"YITH Booking and Appointment: Consider min\/max duration in calendar","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"YITH Booking and Appointment: Consider min\/max duration in calendar","og_description":"By enabling the &#8220;check min\/max duration&#8221; option in YITH &gt; Booking &gt; Settings &gt; Form Settings, the calendar in frontend will show the dates which are no longer available, including the minimum\/maximum duration. Example with the option enabled Customer A has booked the Amsterdam Apartment for 6 days from 3 January to 9 January. The &hellip; Continue reading Consider min\/max duration in calendar","og_url":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/","og_site_name":"YITH WooCommerce Booking and Appointment","article_published_time":"2018-07-02T11:23:47+00:00","article_modified_time":"2023-03-28T15:17:30+00:00","og_image":[{"url":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1.png","type":"","width":"","height":""}],"author":"Alessio Torrisi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Alessio Torrisi","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/","url":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/","name":"YITH Booking and Appointment: Consider min\/max duration in calendar","isPartOf":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/#website"},"primaryImageOfPage":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/#primaryimage"},"image":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/#primaryimage"},"thumbnailUrl":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1.png","datePublished":"2018-07-02T11:23:47+00:00","dateModified":"2023-03-28T15:17:30+00:00","author":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/#\/schema\/person\/cb8b9dbb75e34f325cc8329424e6a6c5"},"breadcrumb":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/#primaryimage","url":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1.png","contentUrl":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-content\/uploads\/sites\/294\/2018\/07\/min-max-duration-1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/premium-version-settings\/check-min-max-duration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/"},{"@type":"ListItem","position":2,"name":"Consider min\/max duration in calendar"}]},{"@type":"WebSite","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/#website","url":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/","name":"YITH WooCommerce Booking and Appointment","description":"Plugin documentation","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/#\/schema\/person\/cb8b9dbb75e34f325cc8329424e6a6c5","name":"Alessio Torrisi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1dc305ade0adaba279202977d3352276?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1dc305ade0adaba279202977d3352276?s=96&d=mm&r=g","caption":"Alessio Torrisi"},"url":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/author\/alessio\/"}]}},"_links":{"self":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-json\/wp\/v2\/posts\/740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-json\/wp\/v2\/comments?post=740"}],"version-history":[{"count":15,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-json\/wp\/v2\/posts\/740\/revisions"}],"predecessor-version":[{"id":3782,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-json\/wp\/v2\/posts\/740\/revisions\/3782"}],"wp:attachment":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-json\/wp\/v2\/media?parent=740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-json\/wp\/v2\/categories?post=740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-booking\/wp-json\/wp\/v2\/tags?post=740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}