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"
}
]
});