nathanreyes / v-calendar

An elegant calendar and datepicker plugin for Vue.
https://vcalendar.io
MIT License
4.38k stars 856 forks source link

Feature Request: Expandable Width for DatePicker Component in VCalendar #1409

Open mariela-plaza opened 10 months ago

mariela-plaza commented 10 months ago

Description I am currently working with VCalendar (version 3.0.7) and utilizing the DatePicker component for a project. I've encountered a limitation regarding the component's adaptability to its container's width.

Feature Request I propose the addition of a feature for the DatePicker component, similar to the expanded prop available in the Calendar component. This feature would allow the DatePicker to:

Use Case This feature is particularly useful in responsive designs where the DatePicker might be used in various container sizes. Ensuring that it can both maintain a minimum readable size and also take advantage of larger available spaces would greatly enhance its usability and aesthetic integration into diverse layouts.

Current Behavior Currently, the DatePicker component does not seem to support this flexible width behavior. The Calendar component does offer an expanded prop, which allows it to adapt its size based on the parent container, but this functionality is absent in the DatePicker component.

Expected Behavior Ideally, the DatePicker component should have a prop (e.g., expanded or similar) that enables it to dynamically adjust its width based on the parent container's size, while also respecting a set minimum width.

What I've managed to accomplish So far, I've managed to accomplish this by manually changing some css stylings: Date Picker Expanded (Big container) expanded-big-container

Date Picker Expanded (Small container) expanded-small-container