C#时间选择

<script type="text/javascript" src="http://www.shicishu.com/down/WdatePicker.js"></script>  

     <asp:Label ID="Label3" runat="server" Text="年份:"></asp:Label>
                 <input class="Wdate" type="text" onclick="WdatePicker()" id="ityear" runat="server">到
                 <input class="Wdate" type="text" onclick="WdatePicker()" id="ityearend" runat="server">(可选任意范围)
         --------------------------------
		  if (ityear.Value.Length > 0 && ityearend.Value.Length>0)
            {
                swhere += " and CreateDate>='" + ityear.Value+ "' " +
                    " and CreateDate < '" + ityearend.Value+ "' ";
            }
            if(ityear.Value.Length <= 0 && ityearend.Value.Length <= 0){ 
                ityear.Value = "2019-05-01";
                ityearend.Value = "2019-07-01";
                swhere += " and CreateDate>='2019-05-01' and CreateDate < '2019-07-01'";
            }

  

posted @ 2021-09-05 20:30  刘贵庆  阅读(108)  评论(0编辑  收藏  举报