Please disregard the 'View article...' shown at the bottom of many posts as this is the result of restoring old forum posts from a backup.

How to over-ride bootstrap date/time picker

How do I properly over-ride the date/time picker that a bootstrap3 based theme uses? I tried to copy calendarcontrol.php from /framework/core/forms/controls/jquery and copy it to themes/mytheme/controls/jquery/calendarcontrol.php. However the theme is still showing the bootstrap3 base controls. I was expecting it to show the xsoft datepicker. 



  • Proper location in theme is /controls (we don't allow multiple theme frameworks within a custom theme so we dispense with multiple folders/extensions.
  • I have changed the location to /theme/controls/calendarcontrol.php. I still don't see the xsoft datepicker. 
  • You'll have to first clear the Smarty cache for the view template to look to the theme for custom controls/plugins.
  • I've cleared the Smarty caches, as well as all the caches. Still it shows the bootstrap picker. 
  • Just to confirm you:
    • created a 'controls' folder in your custom theme (/themes/yourthemename/controls)
    • you copied the calendarcontrol.php file from /framework/core/forms/controls/jquery/ into that folder
    • are you sure you're looking for the 'calendarcontrol' and not the yuicalendarcontrol (or the yuidatetimecontrol, or the popupdatetimecontrol)?
    • You might want to copy all 4 calendar controls from jquery into the theme?
  • edited November 2016
    I was able to get it to work. The files needed are yuicalendarcontrol.php and yuidatetimecontrol.php. It was out of frustration that I figured it out. I copied ALL the files from /framework/core/forms/controls/jquery into /themes/mytheme/controls. Then I removed one file at a time (and cleared the caches after removing each file) until I got the xsoft date picker to appear.

    I had assumed that since the theme uses bootstrap3 as its framework, that the yui files wouldn't be the ones that it needs. I was wrong. So as long as YUI remains part of Exponent, the xsoft date picker should work. 
  • Yes, the 'jquery' controls override the 'yui' or base controls, then the 'bootstrap' override jquery and finally 'bootstrap3' override bootstrap.We never fully implemented a 'jquery' theme framework, but left the support in in case we wanted to move away from YUI based widgets without requiring Bootstrap 2/3. You can force a YUI or base theme to use the jquery calendar controls by giving it a theme framework of 'jquery'...however in your case, you wanting to descend the chain.
Sign In or Register to comment.