Our powerful JS Calendar component


Post by Romain »

Hi,

I found the recent feature allowing to select non consecutive dates on a calendar

I implemented it based on this example https://bryntum.com/products/calendar/examples/date-resource-non-consecutive-dates/

But when I tried it, I found a problem, that is also found on this example

By default, the following dates are selected : Tuesday 2025-04-01, Wednesday 2025-04-02, Friday 2025-04-04, Monday 2025-04-07 and Tuesday 2025-04-08.
Everything is good, the dates are selected in the calendar.

LhkB6baA7v.png
LhkB6baA7v.png (132.23 KiB) Viewed 68 times

But if you choose de unselect Tuesday 2025-04-08, the Monday 2024-04-07 doesn't appear anymore in the calendar

INbxIQLFHm.png
INbxIQLFHm.png (117.74 KiB) Viewed 68 times

I have the feeling that when I select only the Monday of a week, it's not displayed in the calendar

I also found another problem when I try to show a range of dates coming from Friday to Thursday of the following week : only the dates of the first week are selected in the calendar

rhlgTxu5Af.png
rhlgTxu5Af.png (80.35 KiB) Viewed 68 times

Thanks in advance for your help!


Post by alex.l »

Hi Romain!

Thank you for the report! Looks like a bug. Ticket: https://github.com/bryntum/support/issues/11376
You can subscribe on ticket updates to be notified when it's done.

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy

We do not write the code in bounds of forum support. If you need help with development, contact us via bryntum.com/services


Post by Animal »

This was a bug in DatePicker.getRange(true) (Where true means snapToWeeks) which will be fixed in the forthcoming 6.2.3 release.

It had to evaluate the week range which a selection covered. In your example, that should return { magnitude : 2, unit : 'week' }

This is so that the view can cover the requested range using a fixed range value, but still have dates filtered in and out.

But there was a bug where that returned { magnitude : 1, unit : 'week' }, so it would not show all your selected dates.


Post Reply