Current filter:
                                You should refresh the page.
                                0
                                  • there are other bugs in that class as well. GetNextOccurrence incorrectly returns true and OccurrenceStart set outside [VisibleStart;VisibleFinish] range since IsValidOccurrence method is also broken, see comments below

                                    function TcxSchedulerOccurrenceCalculator.IsValidOccurrence: Boolean;
                                    begin
                                      Result := ((FRecurCount >= 0) and (FIndex < FRecurCount)) or // if FRecurCount>=0 it doesn't take into account FinishDate and incorrectly returns true (according to FIndex check) for OccurrenceStart>VisibleFinish as it happens in my project
                                        ((FRecurCount < 0) and
                                         ((DateOf(FOccurrenceStart) <= FFinishDate) or
                                          (FCalcForReminders and (DateOf(FOccurrenceStart) - 14 <= FFinishDate))));
                                    end;

                                0

                                Dear Vladimir,

                                We're discussing with our developers how this functionality should work. Could you please be so kind as to provide a small demo illustrating the situation in your project? This will help us make a correct decision.

                                Thanks,
                                Serge

                                0

                                I believe in fact there's not much to discuss, it should work as described in help, it should always respect assigned datetime range passed in constructor. and no, I do not have small demo, it happens in my real app which is rather huge. I can't believe you don't see described problem in your own internal tests. I added "and (DateOf(FOccurrenceStart) <= FFinishDate)" to the first part of conditional check in IsValidOccurrence in order to always check for FinishDate and quick tests worked ok but I'm not sure yet how it may influence upon internal scheduler logic since that class is used everywhere. since you obviously have deeper insight in scheduler internals you should make adequate decision whether it's ok or not

                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.