Skip to main content

A small issue in DefaultDateSelectionModel's setUpperBound method!

3 replies [Last post]
prashantatj
Offline
Joined: 2005-06-10
Points: 0

Hi,

When I change the lower bound of the month view, if the selected date is before the lower bound, then it gets cleared. But when the upper bound is set and the selected date is after the upper bound, it doesn't get cleared. I think, it's because of the following line in DefaultDateSelectionModel's setUpperBound method.

line number - 264 : && selectedDates.last().before(this.upperBound))
which should be : && selectedDates.last().after(this.upperBound))

Regards,
Prashant

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kleopatra
Offline
Joined: 2003-06-11
Points: 0

Hi Prashant,

sounds like a bug - could ou please file an issue in the swingx issue tracker, with a link to this thread, so we don't forget to apply your patch?

Thanks
Jeanette

kleopatra
Offline
Joined: 2003-06-11
Points: 0

> Hi Prashant,
>
> sounds like a bug - could ou please file an issue in
> the swingx issue tracker, with a link to this thread,
> so we don't forget to apply your patch?
>

okay, here it is:

https://swingx.dev.java.net/issues/show_bug.cgi?id=808

apart from that possibly incorrect before vs after, the more basic problem was that the dates in the call to removeInterval were switched.

The logic was overly complicated anyway, so streamlined and pulled up into the abstract layer. Should be working now - as of build #963 (provided Hudson doesn't bark ;-)

CU
Jeanette

prashantatj
Offline
Joined: 2005-06-10
Points: 0

Thanks for the quick response, now it works nicely.

Regards,
Prashant