This is a migrated thread and some comments may be shown as answers.

Setting min/max refreshes the view

1 Answer 64 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Michaël
Top achievements
Rank 1
Michaël asked on 07 Dec 2014, 11:47 AM
Hi,

I have two Kendo calendars next to each other: one is used for "from" date while the other is used for "to" date. Whenever the selected date in the "from" calendar is changed, it updates the "min" value for the "to" calendar, and vice-versa.

This works well, except that changing the min and max values seem to redraw the whole calendar, and I loose the context of the current view. For exemple, if the from calendar is currently on the "November" view, and "from" is 3rd of November. On the other hand, if the "to" calendar is currently on "December" view with to set on 3rd December.

If I navigate to the "november" month in the "to" calendar, and changed the date of the "from" calendar (from 3rd to 4th November for instance), then the min is correctly updated on "to" calendar BUT it automatically navigates again to the month of the selected date (hence, December). I think this is a bug, changing the "min"/"max" should not reset the view (unless there is nothing to show, obviously).

Thanks

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 10 Dec 2014, 08:20 AM
Hello Michaƫl,

The behavior is expected, as the calendar will redraw itself when the min/max option is changed. You can use the built-in navigate() option in order to navigate to the particular view that you want to show. More information is available here:

http://docs.telerik.com/kendo-ui/api/javascript/ui/calendar#methods-navigate

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Calendar
Asked by
Michaël
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or