I have two TextBox in a page. When user pick a date from first TextBox, second TextBox has to be first TextBox's day +1(previus dates has to be disable). For exemple: User pick 2020-12-29, second minimum date has to be 2020-12-30. Here is the first TextBox with js codes that sets the date to today.
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
var today = new Date();
var month = ('0' + (today.getMonth() + 1)).slice(-2);
var day = ('0' + today.getDate()).slice(-2);
var year = today.getFullYear();
var date = year + '-' + month + '-' + day;
$('[id*=txt1]').attr('min', date);
});
</script>
<asp:TextBox ID="txt1" runat="server" TextMode="Date"></asp:TextBox>
<asp:TextBox ID="txt2" runat="server" TextMode="Date"></asp:TextBox>
I can't figure it out how to make second TextBox. But I don't have to do it with only js. If you suggest I can also try to make it in c#.