纯html实现input输入框选择日期时间

<!DOCTYPE html>
<html>
<body>

<h1>Show a Date and Time Control</h1>

<form action="/action_page.php">
  <label for="birthdaytime">Birthday (date and time):</label>
  <input type="datetime-local" id="birthdaytime" name="birthdaytime">
  <input type="submit">
</form>

<p><strong>Note:</strong> type="datetime-local" is not supported in Internet Explorer 11 or prior Safari 14.1.</p>

</body>
</html>

在这里插入图片描述

参考
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_type_datetime-local