Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeslot range change leads to selection bug? #9

Closed
ogyr opened this issue Nov 19, 2015 · 2 comments
Closed

Timeslot range change leads to selection bug? #9

ogyr opened this issue Nov 19, 2015 · 2 comments

Comments

@ogyr
Copy link
Contributor

ogyr commented Nov 19, 2015

Setting the min and max props in the Calendar Component (two Date values specifying a starting time and ending time) nicely limit the displayed time range in the Week and Day Views.

I.e. using
min={new Date(2015, 10, 19, 8, 0, 0)}
max={new Date(2015, 10, 19, 21, 0, 0)}

limits the TimeGutter to display only the hours from 08:00 AM to 21:00 PM.
Unfortunately the time properties of the event passed to any onSelectSlot / onSelectEvent handlers now have messed up start and end times. These times seem to still assume a timegrid going from 00:00 to 24:00. Dragging the selection is even worse as now slots light up in a reverse(?) order and start and end times are set to 00:00.

Should this work, should I do something else or is this unsupported behaviour?
Thanks

@austin-chan
Copy link

I have the same problem when changing the min and max props. The .rbc-slot-selection element styles become inaccurate when the hour ranges of the day are changed.

@jquense
Copy link
Owner

jquense commented Nov 22, 2015

hey everyone, defiantely looks like a bug, DaySlot seems to just not be testing against min/max. Annoying oversight. If someone is really anxious to get this fixed as quick as possible feel free to submit a PR, otherwise I will definately address it, just not sure that will happen by next week (holiday week so I am going to be traveling/with family for most of it)

cutterbl added a commit that referenced this issue Dec 20, 2021
fix: Correct duration in DnD (#2034)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants