[spip ↪ dateur] Refonte du da te picker : on abandonne le datepicker (...)

Cerdic <[email protected]>
Newsgroups gmane.comp.web.spip.cvs
Message-ID <[email protected]>
spip/spip
-
Par Cerdic, le 19 mars 2021 à 16h43min : 

Refonte du date picker : on abandonne le datepicker jquery-ui au profit d'un picker plus leger ne necessitant pas tout jquery-ui #4573
Pour se faire, on retient https://github.com/uxsolutions/bootstrap-datepicker documente ici https://bootstrap-datepicker.readthedocs.io/en/stable/ et demo visible ici https://uxsolutions.github.io/bootstrap-datepicker/?markup=input&format=&weekStart=&startDate=&endDate=&startView=0&minViewMode=0&maxViewMode=4&todayBtn=false&clearBtn=false&language=en&orientation=auto&multidate=&multidateSeparator=&keyboardNavigation=on&forceParse=on#sandbox

Au passage :
- le bouton qui etait ajoute au markup apres l'input (posant parfois plein de probleme CSS) disparait, au profit d'une icone calendar en background sur l'input, plus facilement surchargeable ce qui traite #4139
- le picker est navigable au clavier ce qui doit ameliorer #4549

Enfin, tout le JS d'intialisation de inc-dateur reste compatible avec le datepicker de jquery ui.
Pour le moment on force le nouveau picker a la place de jquery ui car le plugin jqueryui est toujours en dist, mais une fois jqueryui sorti des plugins dist, on peut garder le picker de jqueryui su le plugin est actif, et le nouveau picker sinon (au moins dans le public), ce qui permettra de faciliter la transition pour les sites qui ont stylé ou personalisé intensivement le picker de jquery ui
(il leur suffira d'activer le plugin en SPIP 3.3 pour retrouver leur picker)


*Ajouté*
    prive/formulaires/dateur/README.md
    prive/formulaires/dateur/bootstrap-datepicker.js
    prive/formulaires/dateur/bootstrap-datepicker.standalone.css
*Modifié*
    prive/formulaires/dateur/inc-dateur.html
    prive/formulaires/dateur/jquery.dateur.js.html

Détails : https://git.spip.net/spip/spip/commit/d264db7b642320b734c11f0f5d92fd58844fda0e
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.