Transcript from the "Input Types Date & Number" Lesson
>> Jen Kramer: Okay, so the next thing we need to add is a date.
>> Jen Kramer: Guess how the date tag is gonna look?
>> Speaker 2: Date?
>> Jen Kramer: Kind of like that, right? Same sort of format. The ID is gonna be what? What should we call the ID?
>> Speaker 3: The date?
>> Jen Kramer: How about date?
What should we call the name?
>> Speaker 2: Date.
>> Jen Kramer: How about date? Okay? And our input type is gonna be what? How about date?
>> Jen Kramer: Okay, so a little bit about the date type here in HTML. This date input type is a relatively new addition to HTML. And there's actually not a lot of consensus about how the date tag looks and how it functions.
>> Speaker 2: Date.
>> Jen Kramer: Label [LAUGH], <label for=date>, right? And /label.
>> Jen Kramer: Yeah?
>> Speaker 3: What if you wanted to add a time as well?
>> Jen Kramer: There is a time option as well, if you wanted to do that. I'm not gonna go through that, but you can look that up. Okay, so I am in Firefox right now.
[00:02:01] And so once I've coded my date field in you'll see that, by default, it says right here, mm/dd/yyyy, at least here in the United States. Those of you who are overseas using a different date format, you may see a different sort of placeholder here in that particular field.
When I click on it, I'll actually get a little drop-down here with a little calendar, okay? So this is Firefox, and that's how that looks here. If I go over to Chrome, and take a look at it here,
>> Jen Kramer: Chrome has got the same thing. It's got that same little date placeholder.
[00:02:40] When I roll my mouse over it, it actually has a little down arrow that appears. That didn't happen in Firefox. And when we click on that, it also gives us a calendar, but it's a different formatted calendar. See what I'm talking about? These things are somewhat different. They're coming from the browser.
>> Speaker 2: I was gonna ask if you could CSS?
>> Jen Kramer: Yeah.
It might be completely different from what you just saw here, cuz that date formatting is coming from the browser once again.
>> Jen Kramer: Okay, moving on, how many people would you like abducted?
>> Jen Kramer: Well, you might not wanna just go just by yourself. Maybe you wanna bring your friends, right?
Okay, guess what this is gonna look like?
>> Jen Kramer: Oops, not like that, it's gonna look like this. Just like our other input types, only we're gonna change a few things here, okay? So this time we're gonna change our type here to number, okay? So this is obviously gonna collect a number, cuz we're asking how many people we want abducted.
>> Jen Kramer: And then we have an ID. And for that, I use the value of qty as in quantity, shortened qty. And my name is also qty.
>> Jen Kramer: And then, of course, what else do we need to do?
>> Speaker 3: Change it to a label.
>> Jen Kramer: Change it to a label, <label for=qty>.
>> Jen Kramer: Okay, fabulous, let's refresh our page.