Hi All,
I have a textbox on my ASPX page the when clicked loads the 'jQuery datepicker' object to select a date. The issue is I want the user to be able to leave the textbox blank if they want all results to be returned when they click the search button. I would like the either set a default date that is hidden or allow the SQL query to ignore the WHERE clause is the textbox = ""
The search button runs a SQL query with a WHERE clause >= the textbox field.
ASPX Page
Script
<script>
$(function () {
$("#datepicker").datepicker({
dateFormat: 'dd/mm/yy',
changeMonth: true,
changeYear: true
});
});
</script>
Body
<asp:accessdatasource ID="AccessDataSource1" runat="server" DataFile= "C:\Data.mdb" SelectCommand="SELECT [StartDate], [FirstName], [LastName] FROM [Staff] WHERE [StartDate] >= datepicker )">
Any ideas?
Thanks