0

i have asp textbox like that:

<asp:TextBox ID="TextBoxExitTime" TextMode="DateTimeLocal" runat="server"></asp:TextBox>

i want that all of the dates (and times) will be in the future.
if it was <input type="dateTime-Local"/> i would write in the code behind TextBoxExitTimeAttributes.Add("min", DateTime.Now.ToString()); but with the asp:textbox it doesnt work.
when i press ctrl+shift+i it shows me min="26/05/2021 17:18:12" but i still can choose date from the past.
what can i do?

  • unless I'm mistaken, the control should be `input type="datetime-local"`, I can see at least one typo you've made there (i.e. `inut`). Can you verify what is a typo here, and what is not? – Brett Caswell May 26 '21 at 14:47
  • Also, can up update your title to reflect on your actual issue here. that control has **min** by [HTML Standard Spec](https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type=datetime-local)) (see [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local) as well. However, this question relates to an issue you're observing, and your title should reflect that observation and issue. – Brett Caswell May 26 '21 at 15:02

0 Answers0