Open mpf82 opened 3 years ago
In w2ui date picker, if you click on header, it will open this
May be we just need to add down arrow in the header
Yeah, I knew that, but the date picker will not "stop" after selecting the month.
I am suggesting new field types:
.w2field('month', { format: 'm/yy' ... // => 1/21
.w2field('month', { format: 'yyyy-mm' ... // => 2021-02
.w2field('year', { format: 'yy' ... // => 21
.w2field('year', { format: 'yyyy' ... // => 2021
analogue to the already existing date, time, and datetime
.
For month
it's probably be sufficient to use the already existing date
picker, bring up the month view as default (as seen in your screenshot) and just make it stop after selecting the month.
I did a change when dbl click on a month will select it with current year (same with year). As for m/yy
find of formats. Possibly it is a good idea, but still struggling how is it better then 2 drop downs ))
One advantage would be to use start+end functionality, just like 2 w2fields of type date
.
And one field makes validation and getting/setting of values easier than 2 drop downs.
We already have date, time and datetime picker.
A month picker and a year picker would be nice additions.
We're currently using JQuery UI's Date Picker as a month picker, but it just does not feel that well integrated with the rest of the w2ui components: