使用ASP.NET TextBox Control过滤SharePoint ListView WebPart

时间:2017-03-22 18:24:43

标签: asp.net sharepoint sharepoint-2013

我有一个需要过滤的SharePoint ListView WebPart。我使用的是ASP.NET DropDown List Control和两个ASP.NET texbox(type="date")。这三个元素的选定值将发送到参数,用于过滤列表。下拉列表工作正常,并相应地过滤,问题是文本框。它在Chrome中运行得很好,我猜是因为Chrome认可 <div class="startDate" style="float:left; margin-left:4px"> <asp:Label AssociatedControlID="startDateBox" Text="Start Date" BackColor="Aqua" Font-Size="X-Large" ID="startLabel">Start Date</asp:Label> <asp:TextBox Text="" ToolTip="From" AutoPostBack="true" runat="server" TextMode="Date" ID="startDateBox" CausesValidation="true"></asp:TextBox> </div> <div class="endDate" style="float:left; margin-left:4px"> <asp:Label AssociatedControlID="endDateBox" ToolTip="To" Font-Size="X-Large" ID="endLabel">End Date</asp:Label> <asp:TextBox AutoPostBack="True" runat="server" TextMode="Date" ID="endDateBox" CausesValidation="True" AutoCompleteType="Enabled" ValidateRequestMode="Enabled" Text=""></asp:TextBox> </div> ,但IE的情况并非如此。

这是我的相关代码,如果需要更多,请告诉我们:

SELECT * FROM data WHERE url LIKE '%[a-z]'

我可以在这做什么?我错过了什么?提前谢谢。

1 个答案:

答案 0 :(得分:1)

IE中不支持日期TextMode,因此它不能使用这些HTML5属性与IE一起工作。您可以使用JQuery UI Date Picker作为替代方案,请查看下面的示例。

&#13;
&#13;
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>jQuery UI Datepicker - Default functionality</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <script>
  $( function() {
    $( "#datepicker" ).datepicker();
  } );
  </script>
</head>
<body>
 
<p>Date: <input type="text" id="datepicker"></p>
 
 
</body>
&#13;
&#13;
&#13;

此外,您可以通过此链接https://jqueryui.com/datepicker/

查看更多详情
相关问题