function submit_date_filter() {

    //console.log(d3.event.target);

    // Prevent the page from refreshing
    d3.event.preventDefault();

    // Select the input element and get the raw HTML node
    var inputElement = d3.select("#datetime");

    // Get the value property of the input element
    var selected_date = inputElement.property("value");

    //console.log(tableData);
    console.log(selected_date);

    if (selected_date){

    var filtered_by_sighting_date=tableData.filter(filterbydate.bind(this,selected_date));
    
    //Set the table body to blank
    
    console.log(filtered_by_sighting_date);

    builddatatable(filtered_by_sighting_date,selected_date);
    }
    else {
        alert("Please enter date in format m/d/yyyy");
        //console.log("In Else part")
    }

    
}
// Event handler function for the date filter
Event handler function for the date filter
Event handler function for the date filter
function submit_date_filter() {
    d3.event.preventDefault();
    var inputElement = d3.select("#datetime");
    var selected_date = inputElement.property("value");
    console.log(selected_date);
    if (selected_date){
    var filtered_by_sighting_date=tableData.filter(filterbydate.bind(this,selected_date));
    console.log(filtered_by_sighting_date);
    builddatatable(filtered_by_sighting_date,selected_date);
    }
    else {
        alert("Please enter date in format m/d/yyyy");
    }
}
function submit_date_filter ( ) { d3 . event . preventDefault ( ) ; var inputElement = d3 . select ( "#datetime" ) ; var selected_date = inputElement . property ( "value" ) ; console . log ( selected_date ) ; if ( selected_date ) { var filtered_by_sighting_date = tableData . filter ( filterbydate . bind ( this , selected_date ) ) ; console . log ( filtered_by_sighting_date ) ; builddatatable ( filtered_by_sighting_date , selected_date ) ; } else { alert ( "Please enter date in format m/d/yyyy" ) ; } }
Event handler function for the date filter
Event handler function for the date filter
//console.log(d3.event.target); // Prevent the page from refreshing // Select the input element and get the raw HTML node // Get the value property of the input element //console.log(tableData); //Set the table body to blank //console.log("In Else part")