Open
Description
Check out datetime picker that offers method for picking only month or only year: http://t1m0n.name/air-datepicker/docs/#example-months.
It would be great to have something like that available in Flatpickr.
Milan
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
chmln commentedon Sep 16, 2016
Hello,
To be honest, I don't find this a necessary, or even very usable to be worth the effort of implementing.
Also, a lot of clicking there, and no options of direct input.
A couple of selects would be much easier to use
thejae commentedon Mar 28, 2017
+1 for this feature. May suggest the implementation of year range selection as well. For eg; Jan 2001 - Dec 2010
Guoxweii commentedon Jul 13, 2017
heyange2002 commentedon Jul 24, 2017
+1
RedShift1 commentedon Nov 14, 2017
+1 Seems like a nice usability improvement in cases where you're working with months and selecting a day wouldn't make sense.
davestewart commentedon Aug 15, 2018
@chmln
We've just started using this at a bank, and choosing by month is something we do a lot.
It's a perfectly valid use case, especially when we only want to rely on a single configurable date-picker component.
chmln commentedon Aug 15, 2018
Now that scrolling is removed, let's make this happen :)
davestewart commentedon Aug 15, 2018
That's great news! The team is stoked 😁
davestewart commentedon Aug 28, 2018
@chmln - of course, we're interested to track the progress of any work on this.
Is there an ETA, or some way for us to do this?
I'd be happy to work on this myself, though my knowledge of Flatpickr is minimal.
Just checking out the docs, it seems that in the first instance, the time picker JS and UI could be repurposed.
I might get one of our guys to look at this next week...
ngstwr commentedon Oct 3, 2018
@chmln Is there a timeline for this or is it already implemented? I couldn't find any option or mention on documentation.
chmln commentedon Oct 3, 2018
Hey all, I wish I could provide an ETA but I can't at the moment. It will be as soon as I can get some chunk of free time, within a month or two. Extremely busy at the moment in my final year at university.
If anyone wants to work on this - please go ahead, but keep it plugin-based as flatpickr core should not get any larger.
Thank you all for patience. :)
paolog22 commentedon Nov 20, 2018
+1 for this user make the Month and Year Select/Dropdown for easy navigation, rather than clicking multiple times just to navigate
28 remaining items
mordekasg commentedon Jun 3, 2019
Use:
monthSelectPlugin
.croane commentedon Jun 4, 2019
Thanks, @mordekasg! This config worked:
Kinjalbagaria commentedon Jun 5, 2019
@chmln : Is there any option available to disable this monthSelect? coz I dont want this functionality by default.
abriginets commentedon Jun 15, 2019
@chmln I agree with @Kinjalbagaria. Please, make new functionality disabled by default. I want a simple text, not ugly
<select>
.mikes-gh commentedon Jun 17, 2019
@Kinjalbagaria @JamesJGoodwin
I think this thread is about the month select plugin which is different to the
<SELECT>
month function which was added recently. As you have found out<SELECT>
doesnt look great in a lot of browsers and cant be styled.I think you are looking for this issue
#1826
el-mark commentedon Jun 20, 2019
Should I need to import the monthSelectPlugin on the component? I see this error "Uncaught ReferenceError: monthSelectPlugin is not defined". If some can help please.
mikes-gh commentedon Jun 20, 2019
You need
in your HEAD section
and
in your scripts section
artur79 commentedon Mar 11, 2021
If anyone struggling with it, here's how to load that plugin in Rails' webpacker
ameerjohn commentedon Nov 3, 2021
import "./styles.css";
import Flatpickr from "react-flatpickr";
import monthSelectPlugin from "flatpickr/dist/plugins/monthSelect";
require("flatpickr/dist/plugins/monthSelect/style.css");
require("flatpickr/dist/flatpickr.css");
export default function App() {
const options = {
plugins: [
new monthSelectPlugin({
// shorthand: true, //defaults to false
// dateFormat: "F Y", //defaults to "F Y"
// altFormat: "F Y", //defaults to "F Y"
// theme: "light" // defaults to "light"
})
]
};
return (
<Flatpickr options={options} value={new Date()} />
);
}
ameerjohn commentedon Nov 3, 2021
#
carltongibson commentedon Jul 19, 2023
The provided
monthselectplugin
resolves this issue. I think it could be closed. 🤔https://flatpickr.js.org/plugins/#monthselectplugin
nmauludina commentedon Aug 6, 2023
How to use it with cdn?