Implemented Conditionally load Pikaday

Kirby

Well-known member
As it is right now, Pikaday (date picker component) CSS & JS is included in XF core, eg. it is being loaded on every page.

But this component is rarely being used, as far as I can see only for
  • Advanced search form
  • Editing custom fields that have a date picker
  • Editing user bans
I did a quick check on one of our largest XenForo 2 forums and thouse pages seem to account for < 1% traffic.
So on most pages, this does add overhead for parsing CSS & JS although it is never being used.

I would be great if this could be changed so that Pikaday resources are conditionally loaded only when they are really required.
This would most likely increase the amount of JS included on affected pages by one, but that seems well worth it to me.
 
Upvote 10
This suggestion has been implemented. Votes are no longer accepted.
Top