plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
450 stars 611 forks source link

DateWidget Year Selector #3783

Open arky opened 1 year ago

arky commented 1 year ago

Is your feature request related to a problem? Please describe. The volto date widget (singledatepicker) has usability issues. It is not possible to quickly switch years without resorting to swiping multiple times. AFAIK there isn't a shortcut for switching years with keyboard.

Describe the solution you'd like In Plone Classic interface, you have separate year selector to select a target year. 210723c965eaf4ebe05c2bd27506497078fdb97b

Describe alternatives you've considered react-dates has introduced 'renderMonthElement' that allows you to create month and year dropdown selectors similar to plone classic interface.

yashnerkar commented 1 year ago

can I work on it?

tiberiuichim commented 1 year ago

I wonder why we don't use the simple <input type='date'>. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date

stevepiercy commented 1 year ago

<input type='date'> and all of its attributes, including pattern for graceful degradation, min, and max, would be my preference as a default date widget. If someone needs a more robust date widget, there are plenty of them out there. I usually regret adopting JavaScript date and time pickers in my projects, and recently have taken great pleasure in ripping them out to use the HTML version.

arky commented 1 year ago

+1 for @tiberiuichim suggestion on using input HTML element.