datePicker not working when not logged as an admin
I added this to my view file
<?php echo Core::make('helper/form/date_time')->date('claimdate', $date_field); ?>
Tested it and all worked well,
Logged out and back in as a non-admin user only to find that the datepicker has stopped working. After some digging and dropping the one line of code into a test site running
elemental I came across this error in firebug
TypeError: $(...).datepicker is not a function
By making the user am administrator the datepicker worked again and when a user again it stopped.
I have checked that JQuery is loading, that it is declared in registerAssets.
I can see jquery is loaded in firebug.
So now I am at a loss as to why this is happening, any suggesting most welcome
This is running on a ubuntu 1404 server, using nginx and running C126.96.36.199 with no other add-ons on the page.
if so, try it within a $(document).ready()
I have a gut feeling its permissions somewhere but I am at a loss as to where
I think the core date picker might require jQuery UI.
If so, you can try requiring it in your page_theme.php:
- in registerAssets()
into the page_theme.php of the elemental theme and the datepicker started working again
Thank you for your help