Open cleidigh opened 5 years ago
Please Consider splitting your single post on this issue into a description of the problem and comments describing possible solutions (one comment for each solution or one for both).
Is it possible to achieve a "if Lightning is installed use its picker for consistency, otherwise use flatpicker" as a combined solution?
A direct link to JS or XUL code would be appreciated
With the datepicker XUL element deprecated there are several options:
Replace with Lightning's custom element (requires extension or its files) Good example extension: Send Later https://github.com/cleidigh/ThunderKdB/tree/master/xall/x68/195275-send-later-3 Specifically here:
https://github.com/cleidigh/ThunderKdB/search?q=datepicker+path:xall/x68/195275-send-later-3/src
Alternative datepicker widgets are also possible options: One decent alternative is flatpickr : https://flatpickr.js.org
I use it in ThunderStats:
https://github.com/cleidigh/ThunderKdB/tree/master/xall/x68/596736-thunderstats
Specifically here: https://github.com/cleidigh/ThunderKdB/search?q=flatpickr Or: https://github.com/cleidigh/ThunderKdB/blob/77ada97f65fc91b7e8ceaf174b83e5c17d90a8e7/xall/x68/596736-thunderstats/src/chrome/content/mzts-settings-nobusinessdayeditor.xhtml