flatpickr icon indicating copy to clipboard operation
flatpickr copied to clipboard

Is it possible to combine plugin "monthSelect" with "mode: 'multiple' ?

Open Techiu opened this issue 6 years ago • 7 comments

I want to select multiple months in my project.

But it did not work out with below options:

config: { mode: 'multiple', plugins: [ new monthSelectPlugin({ shorthand: true, dateFormat: 'Y-m', altFormat: 'F Y' }) ] }

Does not the plugin "monthSelect" suport mode 'multiple' ? How can I achieve it with flatpickr ?

Thanks.

Techiu avatar Jun 12 '19 06:06 Techiu

Unfortunately, it does not support multiple months.

If you have the time and disposition, it would be great if you could update the plugin yourself and do a pull request. Otherwise, this would go into the queue to be worked on on a future date.

viorelsfetea avatar Jun 12 '19 07:06 viorelsfetea

Is anyone working on this? This would be great extra functionality to have.

I had a look at it but wasn't sure where to start, would it be the monthSelect plugin itself or on the base project?

Jamiebullock87 avatar Nov 05 '19 10:11 Jamiebullock87

Same question but for { mode: 'range }

It would be something like this : config: { mode: 'range', plugins: [ new monthSelectPlugin({ shorthand: true, dateFormat: 'Y-m', altFormat: 'F Y' }) ] }

It would be very useful.

gumyn avatar Aug 11 '20 08:08 gumyn

Is anyone working on this? This would be great extra functionality to have.

I had a look at it but wasn't sure where to start, would it be the monthSelect plugin itself or on the base project?

+1

gumyn avatar Aug 11 '20 08:08 gumyn

Any news on this issue?

ndinhphi avatar Oct 25 '22 09:10 ndinhphi

Any work around?

edmund5 avatar Oct 25 '22 10:10 edmund5

For me it is working { mode: 'range', dateFormat: 'd/m/y', plugins: [ new monthSelectPlugin({ shorthand: true, theme: "light" }) ], onChange: (selectedDates) =>{ console.log(selectedDates); } }

it will print in console

image

dmitryvatagin avatar May 31 '24 10:05 dmitryvatagin