In the filter function, the value of mindate and maxdate returned as null . This is because .data() did not save the updated value from datepicker.
I updated your code to use the datepickers value as shown in the script.
http://jsfiddle.net/XHW3w/9/
$("#filter").on("click", function () { var mindate = $('#datetimepicker1').val(); // uses the val method var maxdate = $('#datetimepicker2').val(); // uses the val method var product = $("#products").data("kendoDropDownList").value(); var order = $("#orders").data("kendoDropDownList").value(); if (!mindate || !maxdate || !product || !order) { var content = ""; if (!mindate) content += "<div class=\"k-error-colored\">mindate is not defined!</div>"; if (!maxdate) content += "<div class=\"k-error-colored\">maxdate is not defined!</div>"; if (!product) content += "<div class=\"k-error-colored\">product is not defined!</div>"; if (!order) content += "<div class=\"k-error-colored\">order is not defined!</div>"; $("#filter-msg").data("kendoWindow") .content(content) .center() .open(); return false; } });
source share