4 ms·
Input type=“date” was added and is supported in HTML5, no js required. Same with time!
by freeone3000 3y ago
Input type=“date” was added and is supported in HTML5, no js required. Same with time!
- crooked-v 3y ago...which is great as long as you don't need a calendar on the page itself, or a calendar that shows two months instead of one, or a calendar where you can display information on dates or block selection of certain dates, or a calendar you can add any CSS styling to, or... you get the idea.
- clipsy 3y agoWhat browser do you use? You can test `input type="date"` here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date https://developer.mozilla.org/en-US/docs/Web/HTML/Element/in... -- I've tested every up-to-date browser I have on my laptop and phone and they all display a proper calendar-style date picker.
- wild_egg 3y ago_date picker_, yes. Calendar display? No native options. The person you're replying to is talking about displaying event data to users which always requires building custom components or pulling in libraries which do
- deleted 3y ago[deleted]
- bombcar 3y agoWhich is hilarious because it can display a calendar for date picking; but cannot display a calendar.
- smaudet 3y agoLikely because the element authors didn't want to overload the existing input semantics. You are talking about <calendar /> not <input type="date" />. Its the same semantic issue that lead to <button /> and <input type="button" />, with different functionality/support in different browser(s), and why we have auto-fill libraries that eventually became javascript component libraries, got rolled into development frameworks and turned into hyper-adware... Its "hilarious" but an "input" that does nothing but show an input calendar is arguably better. Otherwise, you're not writing (semantic) html, you're writing <insert ui framework>.