iT邦幫忙

0

html 中的 date無法選擇日期

ruby 2021-11-03 21:30:581885 瀏覽

input type = date 無法選擇日期,執行時跑出來的是text
在網路上複製別人的程式碼跑出來的也無法選擇日期
請問要怎麼做才能讓它正確顯示呢?? 謝謝~~~

<p>出生年月日 :
	<label for="birth"></label>
	<input type="date" name="birth" id="birth">
</p>
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

2 個回答

1
純真的人
iT邦大師 1 級 ‧ 2021-11-03 22:18:54
最佳解答

那個大概是你的瀏覽器不支援吧~
我測試正常呢~
https://ithelp.ithome.com.tw/upload/images/20211103/20061369U1IGbrxGdp.png

參考網址:
https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input/date

0
LucianoLee
iT邦研究生 5 級 ‧ 2021-11-04 10:08:49

p tag 裡面放 input??
其實你label是空的,如果要在外面封包的話可以換成div或fieldset

我要發表回答

立即登入回答