4
I have a research page for a sales report and I use a textbox
that generates a input
type "date", and whenever the page loads the value of the field is "dd/mm/yyyy".
I would like that whenever the page was loaded the field would show the current date without I need to open the calendar to choose the date. How can I do that?
I put this in the programming, but when it loads the page does not work, I put it -> txtInicio.Text = Datetime.Today.Toshortdatestring(); The attribute Value does not have in a textbox
– Lucas Sousa
Ah, I get it. I’m going to edit the answer. First I want to understand: you do an HTML inspection and the
<input>
appears with at least onevalue
? Or nothing shows up?– Leonel Sanches da Silva
Nothing appears
– Lucas Sousa
The result in HTML by chance is
<input type="date" ...>
?– Leonel Sanches da Silva
It looks like this: <input name="calInicio" type="date" id="calInicio" class="form-control" placeholder="DD/MM/YYYY" style="height:32px;width:180px;">
– Lucas Sousa
Now it all makes sense. Keep an eye out. I’ll edit the answer.
– Leonel Sanches da Silva
Guy worked out, thank you very much !
– Lucas Sousa