Hi
In ASP.net razor pages is the bottom part of the page (@section Scripts) shown below used for Javascript? Or can you also put C# code here. I am new to C# and Javascript so am not sure which one this is
@section Scripts {
function filter() {
var from = $("#from").val(), to = $("#to").val();
if (from) from = new Date(from);
if (to) to = new Date(to);
if (from) {
if (to)
f = d => d >= from && d <= to;
else
f = d => d >= from;
}
else {
if (to)
f = d => d <= to;
else
f = _ => true;
}
$("#scroll-horizontal-datatable tbody tr").each(function (_, r) {
if (f(new Date($("[data-date]", r).data("date"))))
$(r).show();
else
$(r).hide();
})
}
}