Telerik Forums
Kendo UI for jQuery Forum
1 answer
388 views

Hi,

  In Kendo Scheduler I need to add colour to the slots based on the start and End date 
(i.e.) If startdate is Monday 10AM and EndDate is Tuesday 12PM means inbetween the slots are need to fill with yellow colour refer to not available period.

The start and End days are dynamically changed based on that the slots colour are need to change. 
currently I am using the following code to colored but it take long time to process. It took each slot one by one by.

I need based on start and End date, the in between slots are need to colored in a single shot itself, it should not loop for each and every slots in the table.

view.table.find("td[role=gridcell]").each(function () {
if ($(this) != null) {
var selectSlot = $(this)
var slot = scheduler.slotByElement(selectSlot);
/Comparing the start and Endate  and coloured
if ((slot.startdate >= startdate) && (slot.enddate <= enddate) //dummy conditions
selectSlot.addClass("slot-selected");
}
});

Tyler
Top achievements
Rank 1
 answered on 27 Nov 2017
1 answer
323 views

hi,

Need your help.

I have a problem with kendoSortable and tabStrip.
when the direction in the page is right to left it does not work correctly.
I'm using your demo of kendoSortable  with tabStrip from: 
http://demos.telerik.com/kendo-ui/sortable/integration-tabstrip
just add to the body dir="rtl"

 

thanks

Ivan Danchev
Telerik team
 answered on 27 Nov 2017
8 answers
194 views

Hi! I was wondering what would be a more "proper" way of doing this.

I have a set of elements that have a boolean flag inside. What I was thinking is having a kendo window appear as popup, and having each element represented by a button, that can be toggled on or off by clicking it. Now, I don't want each click to issue an update request to the server, rather I'd like having a "batch" update of sorts where I have an "Ok" and "Cancel" button in the popup, much like the default Grid's popup editor.

What I've come up with is using a ListView instance and using the (undocumented?) kendoEditable widget, like this: https://dojo.telerik.com/EnepI

As you can see, it sort of works, but only once per item. The buttons get initialized with the k-state-disabled class if the model is disabled, and the toggle function gets called when you click on them. Now the thing is that the "change" event handler of the model tries to regenerate the HTML of the element, replaces the button for one that doesn't has the data-bind events bound. So further clicks don't call toggle, the k-state-disabled isn't toggled anymore and it doesn't produces notifications either.

I'm not sure I'm going at this from a good angle, any suggestions?

Miguel
Top achievements
Rank 1
 answered on 27 Nov 2017
1 answer
235 views

Hi, my Kendo UI version is 2017.3.913, my chrome version is 62.0.3202.94 .

What I want to do is Taiwan Calendar(MSDN: https://msdn.microsoft.com/en-us/library/system.globalization.taiwancalendar(v=vs.110).aspx )

Basically just minus 1911 from common era's year, example: select 2017/11/24, show as 106/11/24.

but still need keep duration as common era, can't use common era as Taiwan calendar ,

example: if input 11/24/106 to demo's date picker , it even doesn't support year before 1900...

 

Or, how to change actual year after I input/pick date?

Like, if I input 106/11/24, maybe can change it's actual year to 2017,

so user can see Taiwan calendar year, and program also can get common era date 2017/11/24.

Also, if user pick date 2017/11/24, change visible text to 106/11/24, but keep actual date type value as 2017/11/24.

 

If datepicker can't support this situation, maybe I just hide date picker's input and do a textbox myself,

and do  text convert to date, date convert to text process or something...

Georgi
Telerik team
 answered on 27 Nov 2017
2 answers
617 views

Hi,

 I am using kendo scheduler and am getting slots startdate and End Date are showing undefined error while initially loading the dialog.

After loading the page if I click the slots then I am getting that startdate undefined error.

After clicking the k-i-refresh icon the scheduler then it's working correctly.

I need to know why after clicking the k-i-refresh icon it's working and I need to do in initial itself

 

this is my code,

this.$('#cheduler').kendoScheduler({
dateHeaderTemplate: "<span class='k-link k-nav-day'>#=kendo.toString(date, 'ddd')#</span>",
majorTimeHeaderTemplate: kendo.template("<strong>#=kendo.toString(date,'h tt')#</strong>"),
slotTemplate: "<div style='background:white;'></div>",
workDayStart: new Date("2013/1/1 12:00 AM"),
workDayEnd: new Date("2013/1/1 11:59 PM"),
majorTick: 60, // a major tick represents 60 minutes (1 hours)
minorTickCount: 1, // a minor tick count represents the slots in the major tick
allDaySlot: false,
selectable: false,
editable: false,
header: false,
footer: false,
views: [
{
type: 'week',
selected: true,
workWeekStart: 6,
currentTimeMarker: false
}
],
dataSource: [
],
dataBinding: function (e) {
var tables = self.$(".employeeAvailablitycalendar .k-scheduler-times .k-scheduler-table");
tables = tables.first();
var rows = tables.find("th");
if (!isSelectable) rows.addClass("whiteboxshading");
else rows.addClass("greyboxshading");
},
dataBound: function (e) {
thisView.schedulerLayout(this)
thisView.readSchedules(this)
}
});

// to hide the Header tool...
this.getScheduler().wrapper.children("div").hide();

I don't want the header tool part to show and I need the slot startdate and enddate on initial dialog loading itself.

 
Anil
Top achievements
Rank 1
 answered on 27 Nov 2017
2 answers
645 views

Hi,

I am using following code to bind my grid, i want to change default date filter to "is before or equal to" instead of "is equal to" and i want to hide all remaining filter options except "is before or equal to" and "is after or equal to"

 $(gridid).kendoGrid({
        dataSource: {
            data: dSource,
            schema: {
                model: {
                    fields: {
                        Title: { type: "string" },
                        Location: { type: "string" },
                        Status: { type: "string" },
                        StartDate: { type: "date" },
                        Start: { type: "date" }
                    }
                }
            },
            pageSize: 10
        },
        pageable: true,
        sortable: {
            mode: "single"
        },
        filterable: {
            mode: "row",
            operators: {
                string: {
                    contains: "Contains"
                }
            }
        },
        height: 450,
        columns: [
            {
                field: "Title", title: "Title",
                filterable: {
                    cell: {
                        operator: "contains"
                    }
                }
            },
            {
                field: "StartDate", title: "Start", template: "#= kendo.toString(Start, 'h:mm tt dd/MM/yy') #", width: "150px",
                //filterable: {
                //    cell: {
                //        //template: datePicker,
                //        operator: {                            
                //            gte: "After or equal to",                            
                //            lte: "Before or equal to",
                //            eq: "On"
                //        }                        
                //    }
                //}
            },

 ]
    });

Muhammad
Top achievements
Rank 1
 answered on 24 Nov 2017
2 answers
213 views
I have a hierarchical grid in which i want to have only one row expanded at a time.  
Muhammad
Top achievements
Rank 1
 answered on 24 Nov 2017
2 answers
1.0K+ views
In hierarchical grid i want to expand detail row on mouse click any where on a master row instead of expand/collapse icon. may i know how i can do that?
Muhammad
Top achievements
Rank 1
 answered on 24 Nov 2017
1 answer
385 views

How to get name of column selected.

When i click Germany or Mexico, i'd like to print 'Country'(column name).

 

onChange:function(e){
 
//get name of column selected
}
Preslav
Telerik team
 answered on 24 Nov 2017
1 answer
473 views

Hello. 

I have a question about kendoui autocomplete and angularjs. I need to start the search when the user press enter how can i accomplish that?

Thx for the help.

Ivan Danchev
Telerik team
 answered on 24 Nov 2017
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?