melohagan / budibase-component-kasper-date-picker

Date picker with text input with options to set format, locale, show/hide calendar. Adapted from the Kasper date picker.
11 stars 6 forks source link

Fix for calendar not showing in the right place if the view scroll #15

Closed lolcabanon closed 1 year ago

lolcabanon commented 1 year ago

This is my enhanced version of your fix related to the issue 1612392680 I opened.

The class spectrum-Form-itemField probably fix what you were trying to fix by adding pickerContainer and also is in line with Spectrum and Budibase conventions. (I don't remember where I found that class, but there is a native BB component using this pattern, probably text input?)

Sorry I had not made this pull request before, I hope you did not spend too much time on that fix... I'm working on a project for a client, so I just forked in a private repo and added stuff I needed quickly. #oops

melohagan commented 1 year ago

Hey @lolcabanon

Thanks for PR, but I'm going to keep the fix I had in place. The key part was this here:

height: 32px
overflow: visible

The overflow is needed to ensure that other fields don't get 'pushed' down when the calendar is opened. So when I tested your fix, the calendar is sticky on scroll, but it does also push:

Screenshot 2023-04-18 at 08 56 19

Whereas with my fix you can see the overflow in action:

Screenshot 2023-04-18 at 08 57 57

lolcabanon commented 1 year ago

Cool makes sense!

When I have the time i'll try to remember what I was trying to fix at first with the class spectrum-Form-itemField.

I think I had noticed something weird when playing with the field settings that made me look in the native components code to see how they were coded.

I'll let you know!

melohagan commented 1 year ago

Thanks @lolcabanon. Appreciate it!