java日历控件如何判断日期的有效性
在程序中加了个日历控件,如下调用
<asp:TextBox ID="TBDate" runat="server" Width="136px" Onfocus="calendar()" AutoPostBack="True"></asp:TextBox>
在后台程序中判断
Protected Sub TBDate_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TBDate.TextChanged
If format(TBDate.Text,"YYYY-mm-dd") < Format(Now, "yyyy-mm-dd") Then
Response.Write("<script>alert('选择的日期无效')</script")
End If
End Sub
在textchanged设了断点调试,为什么运行不到这段程序呢?