Hello,
I am new to Kendo UI and I am having some trouble trying to create a window dialog with datepickers in it.
The first time I load it, it looks great.
Then I close it, open it again and the datepickers don't seem to load properly.
Can you help me or point me in the right direction?
Here's my code:
$("#button").click(function (e) { e.preventDefault(); var kendoWindow = $("<div />").kendoWindow( { open: function () { var picker = $("#project_end_datepicker").data("kendoDatePicker"); if (picker == null) { $("#project_end_datepicker").kendoDatePicker( { animation: false }); $("#project_start_datepicker").kendoDatePicker( { animation: false }); } }, title: "Nieuw project", resizable: false, iframe: true, modal: true }); kendoWindow.data("kendoWindow") .content($("#new-project-dialog").html()) .center().open();});
Hi,
I'm developing a large industry SPA portal on AngularJS and faced several issues with Grid filtering:
1. Column template supports AngularJS directives, but column filter "itemTemplate" isn't:
template: "<the-column value='#= TheColumnValue #'></the-column>",
filterable:
{
multi: true,
itemTemplate: function(e) {
// some conditions here
return "<the-column-filter></the-column-filter>";
}
}
In this code snippet GridColumn's template field works as expected (directive the-column is recognized), but the-column-filter directive, referenced in filter itemTemplate is not recognized and just ignored.
Even worse is that if I started providing filterable option, localization in this specific column resets to default language (en-US):
http://take.ms/Byorr
2. Another localization problem reproduced with "Is null" and "Is not null" operators. As opposed to other operators, these two have no translations to RU:
http://take.ms/zj2rV
But when I tried to provide my own translations for them, other criterias just disappeared:
http://take.ms/Q6wL2
Please, give me a hint to workaround these problems or fix them if possible.
Thank you
Hi,
I have an issue with draggable ui element. I'm trying to achieve following:
- I have a widget that essentially a div (no plugins).
- I have an iframe inside that div.
- I applied draggable to that widget
$(widget).kendoDraggable({ hint: function (element) { return element.clone(); } });I need to see widget when I drag it around. This is why I use 'hint' but because it's a copy of original iframe, it doesn't preserve it's state, it reloads the whole page again, and if user navigated inside the iframe, lets say he scrolled, it's not even the same look.
Is there any possibility that I can drag the same element but not the copy?
Thank you.
Hi,
Pressing the ESC key will normally close a kendo window. But when the kendo window contains an iframe, then pressing the ESC key wont close the window. For instance I have a kendo window containing an iframe, which in turn contains an input text component. Upon opening of the window the input text component gets the focus. Pressing the ESC button now won't close the window. Any suggestions on how to get this scenario working?
Regards,
Ron
I have 2 comboboxes that will be used to filter data in a kendo grid. I am trying to filter the second combobox's data based on the selection from the first combobox. Both comboboxes retrieve their data from Angular service methods. The data is an array, and then I add an extra record at the beginning of each array in case no filter is requested. In the select option of the first combobox, I have a method that will place a filter on the second combobox's dataSource. It requires two filters due to including the extra record. I have included an "or". However, when I run the code, my filter is showing up with an "and". Is it not possible to use two filters that filter on different fields with an "or"?
I am including the important parts of the code below. I was trying to follow the examples, but it just seems to use "and" for my filter.
Thanks for any assistance on this!!
myService.availableCategories.get( null, function (data) { var results = data.results; results.unshift({ categoryID: 0, categoryName: "All", sortOrder: 0 }); vmFilters.categoryOptions = { dataSource: new kendo.data.DataSource({ data: results }), dataTextField: "categoryName", dataValueField: "categoryID", filter: 'contains', value: vmFilters.selectedCategory, select: function (e) { var dataItem = this.dataItem(e.item.index()); onCategorySelect(dataItem.categoryID); } }; }, function (error) { console.log(error); });myService.availableOptions.get( null, function (data) { vmFilters.optionListAll = data.results; var initialItem = { optionID: 0, optionName: "All" categoryID: 0 }; vmFilters.optionListAll.unshift(initialItem); vmFilters.optionOptions = { dataSource: new kendo.data.DataSource({ data: vmFilters.optionListAll }), dataTextField: "optionName", dataValueField: "optionID", value: vmFilters.selectedOption }; }, function (error) { console.log(error); });function onCategorySelect(categoryID) { if (categoryID !== 0) { vmFilters.optionOptions.dataSource.filter({ logic: "or", filters: [ { field: "categoryID", operator: "eq", value: categoryID }, { field: "optionID", operator: "eq", value: 0 } ] }); } else { vmFilters.optionOptions.dataSource.filter({}); } vmFilters.optionOptions.dataSource.read(); console.log(vmFilters.optionOptions.dataSource);}Hi,
I have a problem with Kendo Editor using AngularJs.
When I insert some empty lines (enter), and save, it adds ng-scope to the paragraphs. So when it reloads the value, the placeholder crashes.
Was wondering if you could help me with that.
Please take a look at the attached screenshot.
Thanks
In a Kendo Grid, I have a column that contains a date. I'm using this method for inserting my own control into the cell to edit the date:
function dateTimeEditor(container, options){ console.log("options", options); $('<input data-text-field="' + options.field + '" ' + 'data-value-field="' + options.field + '" ' + 'data-bind="value:' + options.field + '" ' + 'data-format="' + options.format + '" ' + '/>') .appendTo(container) .kendoDateTimePicker( { format: "MM/dd/yyyy", parseFormats: [ "yyyy/MM/dd", "MM/dd/yyyy", ], });} In the column definition I have this:
{ field: "probeDate", title: "Probe Date", width: 60, format: "{0:MM/dd/yyyy}", editor: dateTimeEditor, attributes: { class: "editable-cell" },}So far this works great. Now I wanted to add custom validation to this control, so in the model I have a field defined like this:
type: "date",editable: true,validation:{ validateProbeDate: function (input) { if (console != undefined) { console.log(input); } // Validate the probeDate as well as all of the dynamic fields. if (input.val().trim() === "" || parseDate(input.val()) == null ) { input.attr("data-validateProbeDate-msg", "Probe Date must be a valid date value (mm/dd/yyyy or yyyy/mm/dd)."); return false; } // TODO: Make sure the date falls within the bounds of the probe. // return new Date(input.val()) < probeStartDate... return true; }}This works as far as the validation as it doesn't allow me to leave the field unless my validation method returns true, but the error message won't show on the field and I've tried several methods to try to get it to show up. I assume the problem is in dateTimeEditor() where I'm defining the date edit control.
You can see this in action in this fiddle: Probe Data Entry
Thanks in advance!