大家,我正在用 html5 創建一個日歷,它可以自動阻止特定日期,該信息位于 PHP 變量中,我有要在日歷中阻止的天、月、年的數組,我怎樣才能實現這一點?我只需要一個想法,我該怎么做,這必須用 javascript 完成,對嗎?<!DOCTYPE html><html dir="ltr"><head> <meta charset="utf-8"> <title>Calendar</title></head><body> <?php if(isset($_POST['reservation']) && !empty($_POST['reservation'])) { $startDate = $_POST['start']; $endDate = $_POST['end']; } ?> <form class="" action="" method="post"> <label for="start">Date init</label> <input type="date" id="start" name="start" value="<?php echo date('Y-m-d'); ?>" min="<?php echo date('Y-m-d'); ?>" max="2021-08-10"> <label for="end">Date end</label> <input type="date" id="end" name="end" value="<?php echo date('Y-m-d'); ?>" min="<?php echo date('Y-m-d'); ?>" max="2021-08-10"> <input type="submit" name="reservation" value="Send"> </form></body></html>
如何在 html5 日歷中阻止日期
慕婉清6462132
2023-09-22 16:53:53