naive-ui icon indicating copy to clipboard operation
naive-ui copied to clipboard

Allow for date-picker range to have a single panel

Open wc-davide opened this issue 2 years ago • 4 comments

This function solves the problem (这个功能解决的问题)

Especially in mobile, having two panels makes the page scroll horizontally, see:

image

Having an option to toggle between 1 or 2 panels could easily solve this issue, together with being a useful feature in desktop too (example: when you don't want the calendar to take up too much horizontal space)

Expected API (期望的 API)

Option single-pane="boolean", default false

wc-davide avatar Dec 13 '22 08:12 wc-davide

+1

zxj17815 avatar Dec 19 '22 03:12 zxj17815

+2

i use css fix for this option 👍

.n-date-panel .n-date-panel-calendar.n-date-panel-calendar--end{
  display: none !important;
}

jamalsaidapp avatar Jan 18 '23 11:01 jamalsaidapp

Another solution to have the calendars among themselves:

.n-date-panel { width: min-content!important; display: flex!important; flex-wrap: wrap; }

But this or another solution should definitely be built in for mobile view.

But anyway, props for that amazing framework!

stylefieber avatar Jun 21 '23 14:06 stylefieber

+1

ronannnn avatar May 09 '24 02:05 ronannnn