Add today button to flatpickr
See original GitHub issueHey, I am want to add a ‘today’ button on the ember-flatpickr.
I found this plugin but I can’t make it work. Maybe it’s out of scope, cause already the flatpickr doesn’t support a today button, but I believe many people would like this feature.
Another approach would be to add the button by using ember-elsewhere
although I couldn’t target the .flatpickr-calendar to add the button.
Is there another option I could use for this?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Optional "Today" button in the calendar view #576 - GitHub
I made a small plugin, I mean, it's pretty easy to add some DOM to the calendar when onReady() but the UX of...
Read more >Options - Flatpickr
Config Option Type Default
altFormat String "F j, Y"
altInput Boolean false
altInputClass String ""
Read more >shortcut-buttons-flatpickr - npm
Shortcut buttons is a plugin for flatpickr that provides users an alternative way to interact with the datetime picker.
Read more >Add Open/Close/Clear Buttons - Integrating Flatpickr.js
Add Open/Close/Toggle Buttons to Calendar ... Note that with this page, we're not initializing the calendar by searching for the class, but rather...
Read more >Set current date as "today" in the result using Flatpickr
I am using Flatpickr for my date picker. however, when i select today's date, i want the result to be displayed as "Today"....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@teakap
The docs have a demo of the component functionality. You can play with the component there.
ember-flatpickr wraps flatpickr. We are able to add extra functionality here. It could be an enhancement to ember-flatpickr, rather than flatpickr itself.
flatpickrRefis set to the flatpickr reference, after it is initialized. The reason it is not defined here, isdidInsertElementwill run before the flatpickr is created.ember-flatpickrpasses everything down to flatpickr, so you should be able to create an instance of the plugin ininitand pass it intoember-flatpickr.Something like this:
Does this make sense?
Yiap, it totally makes sense!
I will work on it to see how this can be implemented then! Thanks!