Two datepickers on the same site
If I try to nitialize both with values the first one cant do it. I try to set January of the current year but he every time placed the February and if I select January he jump to December (previous year) !
The same jumoing happens if I select one in the first date picker and click into the second, than the first date picke jumps to december (prev year)?
some code :
var myDate = new Date();
$(document).ready(function() {
$("#datepickerF").kendoDatePicker({
value: new Date(myDate.getFullYear(), 1, 1),
// defines the start view
startView: "year",
// defines when the calendar should return date
depth: "year",
// display month and year in the input
format: "MMMM yyyy",
change: function(){return false;}
});
$("#datepickerT").kendoDatePicker({
value: myDate,
// defines the start view
startView: "year",
// defines when the calendar should return date
depth: "year",
// display month and year in the input
format: "MMMM yyyy",
change: function(){return false;}
});
$("#grid").kendoGrid({ dataSource: { transport: { read: { // the remote service url url: "ajax.lasso", dataType: "json", // additional parameters sent to the remote service data: { ajax_action: "getaccessreqlist" } } }, // describe the result format schema: { // the data which the data source will be bound to is in the "results" field data: "results" }, pageSize: 20, serverPaging: true, serverSorting: true }, height: 450, scrollable: true, sortable: true, pageable: true, columns: [ { field: "name", title: "Requirement Name", template: ' + `'<a href="./?edit/<#= recid #>/"><#= name #></a>'` + ' }, { field: "descr", title: "Description" }, { field: "location_name", title: "Location / Site" }, { field: "restriction", title: "Restriction" } ] }); M = j.extend({
...
_click: function(b) { var c = this, d = a(b.currentTarget), e = d.find("." + n), f = e.attr(m), g = a(c.contentElement(d.index())); if(d.is("." + D + ",." + F)) {// NOTE: Prevent animation of same selected tab b.preventDefault();
} else { if(a("." + v, this.element).filter(function() { return a(this).data("animating") }).length) {return;} if(c.trigger(u, { item: d[0], contentElement: g[0] })) {b.preventDefault(); } else {// NOTE: Animate change of tab var h = e.data(w) || f && (f.charAt(f.length - 1) == "#" || f.indexOf("#" + c.element[0].id + "-") != -1);
if(!f || h) b.preventDefault(); else return; c.activateTab(d) && b.preventDefault() } } }