I'm using a kendo date picker in a jsp binded form (using spring + hibernate). When i try tu submitt the form i get this errros: "Field error in object 'doctorVisit' on field 'date': rejected value [9/25/2018 8:00 AM]" and
"Failed to convert property value of type 'java.lang.String' to required type 'java.time.LocalDateTime' for property 'date'". The binded property Is of LocalDateTime and has formmating set to be Just the same as the date picker formmat. Down under is my Jsp from and Kendo script
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<
html
>
<
head
>
<
link
href
=
"/Kstyles/kendo.common.min.css"
rel
=
"stylesheet"
/>
<
link
rel
=
"stylesheet"
href
=
"/Kstyles/kendo.common.min.css"
/>
<
link
rel
=
"stylesheet"
href
=
"/Kstyles/kendo.default.min.css"
/>
<
script
src
=
"/Kjs/jquery.min.js"
></
script
>
<
script
src
=
"/Kjs/kendo.all.min.js"
></
script
>
<
title
>Appointment</
title
>
</
head
>
<
body
>
<
form:form
modelAttribute
=
"visit"
method
=
"POST"
>
${spec}:<
form:select
path
=
"doctor"
multiple
=
"false"
>
<
c:forEach
var
=
"doctor"
items
=
"${doctors}"
>
<
form:option
value
=
"${doctor}"
label
=
"${doctor.surname}"
/>
</
c:forEach
>
</
form:select
>
Date and time:<
form:input
id
=
"timePicker"
path
=
"date"
/>
Cause: <
form:select
path
=
"cause"
multiple
=
"false"
>
<
c:forEach
var
=
"cause"
items
=
"${causes}"
>
<
form:option
value
=
"${cause}"
label
=
"${cause.description}"
/>
</
c:forEach
>
</
form:select
>
<
input
type
=
"submit"
value
=
"Submit"
/>
</
form:form
>
<
script
>
(function($) {
var dateTimePicker = kendo.ui.DateTimePicker;
var MyWidget = dateTimePicker.extend({
init: function(element, options) {
dateTimePicker.fn.init.call(this, element, options);
},
startTime: function(startTime) {
var timeViewOptions = this.timeView.options;
timeViewOptions.min = startTime;
this.timeView.setOptions(timeViewOptions);
},
endTime: function(endTime) {
var timeViewOptions = this.timeView.options;
timeViewOptions.max = endTime;
this.timeView.setOptions(timeViewOptions);
},
options: {
name: "CustomDateTimePicker",
interval: 20,
}
});
kendo.ui.plugin(MyWidget);
})(jQuery);
var datePicker = $("#timePicker").kendoCustomDateTimePicker().data("kendoCustomDateTimePicker");
datePicker.startTime("07:00");
datePicker.endTime("20:00");
</
script
>
</
body
>
</
html
>
Hi,
We recently upgraded to latest version (2018.2.620) from old one (2016.2.504). On most places all widgets are ok, but in this specific place, my treeList widget doesn't display icons on command buttons (command: ["edit", 'destroy']). When I manually overwrite current (latest) kendo.common.min.css on the server, icons are displayed, but wrong icon is displayed on edit button (chevron up I think). Also, on the same column, I have some classes applied on attributes, but headerAttributes are applied while attributes are not.
This is code for the column:
{
title: "edit",
attributes: {
'class': 'c-centered'
},
headerAttributes: {
'class': 'k-header c-centered'
},
command: ["edit", 'destroy'],
width: 135,
locked: true
}
Hello,
I have a strange situation where I instantiate TreeView and its Pager, but when I hit pager to switch to the page 2, for example, pager reacts, and changes page, description which items are displayed (13-14 of 14), but TreeView contents don't follow and first page remains displayed. Pager DataSource is set to pageSize:12.
Only thing that I do differently from your example is that I initially setDataSource to default empty data source, then on click event on the form, I use it again to set different data source.
I also tried setting data, total under schema manually, but no success.
Here is my code extract for instantiation and change..
function handleTemplateSelector() {
var listView = $("#listView").data("kendoListView");
var pagi = $("#pager").data("kendoPager");
pagi.setDataSource(vm.getNewDatasource());
listView.setDataSource(vm.getNewDatasource());
}
Any suggestions would be welcomed.
Thanks and regards,
Vedad
Hi,
Juste need help to modify the font and colors of all items in a filter for grid widget in mode="row"
Thanks in advance,
François-Régis
Hi!
Is it possible to pass additional data from my grid to the popup window beside the bound object?
@(Html.Kendo().Grid<GazoraAllasModels>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.Oraallas).Title("Óraállás");
columns.Bound(c => c.LeolvasasDatum).Title("Leolvasás dátuma");
})
.Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("AddOraallas").AdditionalViewData(new { maxOra = "=#MaxOra()#" }))
I would like to pass data of a return value of javascript function as you can see (MaxOra()
On the editable template cshtml file has @ViewData["maxOra"] but the value is the string of "=#MaxOra#" and not the value. The cshtml starts with these lines, so I cannot pass this value in model:
@model MyProject.Models.MyProjectModels
@using Kendo.Mvc.UI
@ViewData["maxOra"]
This value cannot be in the model class. I really need to pass it as additional data.
Thanks
Hi,
how can I change the position of the Crosshair Tooltip below the chart?
I found https://www.telerik.com/forums/understanding-valueaxis-crosshair and in the dojo is used
valueAxes: [{crosshair: {tooltip: {position:"left",
But I can not find crosshair.tooltip.position in docs
I'm interested in a chart like amchart, see https://www.amcharts.com/demos/candlestick-chart/
Best regards,
Peter
Hello,
First of all I'm using grid which has columns with timepicker, when I click to select time List of hours is displayed but not axactly above or below of it's timepicker but x rows above or below, sometimes It's not event visble on the screen.
I'm creating these grids dynamically which means when I click on something then grid shows up.
Here is my code :
$(
"#grid-"
+ shopID).kendoGrid({
dataSource: dataSource,
height: 550,
sortable:
true
,
pageable: {
refresh:
true
,
pageSizes:
true
,
buttonCount: 5
},
columns: [
{
title:
"Day"
,
field:
"scheduleDay"
,
format:
"{0:yyyy/MM/dd}"
,
},
{
editor: timePicker,
format:
"{0:HH:mm}"
,
title:
"Godzina rozpoczęcia pracy sklepu"
},
{
editor: timePicker,
field:
"workEndHour"
,
format:
"{0:HH:mm}"
}
{ command: [
"edit"
], title:
" "
}
],
editable:
"inline"
});
};
I've attached image how is it looks like.
On the top I have some kind of summary grid, where I can pick which Grid to show, the problem occurs only on lowest rows. Have no idea how to make this works.