Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hamzajamshed251's avatar

How can i disable multiple dates array in input datetime?

Hi There, i have a issue related to my booking dates basically i want to disable datetime in calender. i have two types of datetime startdatetime and enddatetime so whenever booking happened it will save the dates into database and i get the array from backend and want to disable those datetime in calender

              <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                <div class="">
                  <label>Start DateTime</label>
                  <input type="datetime-local" name="rental_start_time" step="3600" max="2023-08-30" min="2023-09-13" id="rental_start_time" placeholder="From">
                </div>
              </div>
              <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                <div class="to">
						<label>End DateTime</label>
                  <input type="datetime-local" name="rental_end_time" step="3600" max="2023-08-30" min="2023-09-13" id="rental_end_time" placeholder="To">
                </div>
              </div>
            </div>
0 likes
1 reply
vincent15000's avatar

If you don't need the dates, just comment or remove the lines in the view.

Please or to participate in this conversation.