diff --git a/source/Ox.UI/js/Calendar/CalendarEditor.js b/source/Ox.UI/js/Calendar/CalendarEditor.js index 27b0c66c..70694a8e 100644 --- a/source/Ox.UI/js/Calendar/CalendarEditor.js +++ b/source/Ox.UI/js/Calendar/CalendarEditor.js @@ -232,7 +232,6 @@ Ox.CalendarEditor = function(options, self) { // self.$list.options({items: self.options.events}) still // registers as a change items: Ox.clone(self.options.events, true), - keys: ['matches'], max: 1, min: 0, pageLength: self.options.pageLength, @@ -765,11 +764,10 @@ Ox.CalendarEditor = function(options, self) { self.options.selected = data.ids.length ? data.ids[0] : ''; event = event || ( self.options.selected - ? self.$list.value(self.options.selected) + ? Ox.getObjectById(self.options.events, self.options.selected) : {} ); - isUndefined = !fromCalendar && !!self.options.selected - && !self.$list.value(self.options.selected, 'type'); + isUndefined = !fromCalendar && !!self.options.selected && !event.type; if (!fromCalendar) { selectedEvent = self.options.selected && !isUndefined ? self.options.selected