- Issue created by @Anybody
- 🇨🇦Canada mandclu
Thanks for raising this, and for the very detailed description. I agree that this would be an improvement, but would prefer if this was something that didn't need to be implemented within Smart Date itself.
I see that BEF has an issue to move to a native HTML datepicker, 📌 Remove dependency on jquery_ui_datepicker Needs work . If that could be fixed, that would be the ideal solution IMHO.
I have also commented on the date_popup issue with an idea for how the two modules might work together.
- 🇨🇦Canada mandclu
Carrying over some of the conversation from the date_popup thread. In particular, the first draft of a module to integrate Smart Date with Date Popup: https://www.drupal.org/sandbox/mandclu/3370890 →
I can see the logic of adding the code to Smart Date to provide the datepicker, since it looks like adding the relevant code to Smart Date would be less than a hundred lines of code. That said, it does mean maintain those new lines of code, at least until a core solution is committed.
Since there is a well-maintained module that already provides (and maintains) the required code, I tend to lean in the direction of providing an integration with that solution instead.
- 🇩🇪Germany Anybody Porta Westfalica
Thanks for your feedback @mandclu - I'm fine with whatever you decide is the best solution. My key point was to inform users about the incompatibilities, as it wasn't that easy to find out, what blocks the other modules from working.
- First commit to issue fork.
- @codebymikey opened merge request.
- Status changed to Needs review
over 1 year ago 12:09pm 7 July 2023 Hi @mandclu,
The sandbox module you created makes sense, but I've ported it over within the main module for ease of use for those who require the integration without having to introduce a new module dependency.
- 🇨🇦Canada mandclu
@codebymikey thanks for taking the initiative, but your changes seem like they would create a fatal error on any site that doesn't have date_popup installed, and don't event declare that module as a dependency.
In the date_popup issue at 📌 Add a static class for Smart Date, other contrib compatibility Fixed I have proposed adding a service for that module, and here is a patch that will call that service if it's available.
- @codebymikey opened merge request.
Aah okay, that makes sense, thanks for the quick review and feedback!
I never actually tested it without thedate_popup
module installed. I just assumed the new class would only ever get instantiated once the plugin class was declared as a plugin.But yes, your solution seems like a more robust way of acheiving the same functionality across contrib modules, and I've added an equivalent MR for ease of use.
- 🇨🇦Canada mandclu
Updated patch to use the static approach preferred by the date_popup maintainer.
-
mandclu →
committed 8ffd04dd on 4.0.x
Issue #3370579 by mandclu: Integrate with date_popup
-
mandclu →
committed 8ffd04dd on 4.0.x
- Status changed to Fixed
over 1 year ago 11:12am 12 July 2023 - 🇩🇪Germany Anybody Porta Westfalica
This is sooooo nice, thank you both!!
Automatically closed - issue fixed for 2 weeks with no activity.