Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Problem with Date Picker

[SOLVED] Problem with Date Picker 12 Dec 2012 15:58 #6031

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
First, I'm a newbie here so just starting to figure this thing out so this could just be me but I have a page with a date field and I can only get the date picker to work if I run V2.0 Beta ... where should I start looking when I generate using the "regular" Joomla Compatibility option?

Thanks!
Dave
The administrator has disabled public write access.

Re: Problem with Date Picker 15 Dec 2012 14:28 #6114

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
After a little digging I see that the code to load jquery isn't generated in the non-beta version so after adding that to my code the date picker worked.
Last Edit: 15 Dec 2012 14:29 by dyoungers.
The administrator has disabled public write access.
The following user(s) said Thank You: JoomGuy

Re: Problem with Date Picker 15 Dec 2012 14:35 #6118

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Thanks for sharing your solution and apologies you'd not got a response on this yet!

BTW, I'm not sure if you discovered this using firebug or alike but, when using any widgets like datepicker, validation errors etc, tools like FireBug are invaluable.

Glad you got it sorted!

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Problem with Date Picker 16 Dec 2012 21:45 #6154

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
Thanks and yes, I did use firebug to figure it out after seeing some comments on it's usefulness

I'm a Chrome user most of the time but now have Firefox set up for debugging so I'll be using it more

And now that I'm starting to get things figured out, it's pretty clear this website is going to make a lot of things so much easier!
The administrator has disabled public write access.
The following user(s) said Thank You: JoomGuy

Re: Problem with Date Picker 17 Dec 2012 12:20 #6157

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
BTW, chrome also has useful dev features too. Particularly for minified JS as there is a un-minify button ('{}') that splits minified JS across multiple lines.

Anyway, glad you got it sorted!

Thaks again,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Problem with Date Picker 18 Dec 2012 11:24 #6164

  • zutiste
  • zutiste's Avatar
  • Offline
  • New Member
  • Posts: 18
  • Thank you received: 1
  • Karma: 3
Hello,

Could you more specific about what to do to have the date picker work?

Cheers
The administrator has disabled public write access.

Re: Problem with Date Picker 18 Dec 2012 12:13 #6166

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
zutiste wrote:
Hello,

Could you more specific about what to do to have the date picker work?

Cheers
@dyoungers component wasn't loading jQuery which was the issue. From his post, it seems that he had to include jQuery by adding it manually.

TO DO:
  1. Go to your component's admin folder/helpers/helper.php
  2. Locate the function public static function headerDeclarations()
  3. If you can't see
    $doc->addScript($componentUrlAdmin . '/js/jquery-1.8.2.min.js');
    $doc->addScript($componentUrlAdmin . '/js/jquery-ui-1.9.1.min.js');
    then add them underneath the code:
    //Javascript
    $doc->addScript($siteUrl . '/media/system/js/core.js');
    // Mootools non conflict is handled here :
    $doc->addScriptDeclaration("var Moo = document.id;");
    //jQuery Declarations go Here//
Hope it helps

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.
The following user(s) said Thank You: admin

Re: Problem with Date Picker 18 Dec 2012 12:16 #6167

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
OR, replace the links inside the addScript(...) with Google's libraries if you don't have the jQuery & UI scripts downloaded in your component (the folders specified in the addScript).

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.
The following user(s) said Thank You: zutiste

Re: Problem with Date Picker 18 Dec 2012 19:01 #6175

  • zutiste
  • zutiste's Avatar
  • Offline
  • New Member
  • Posts: 18
  • Thank you received: 1
  • Karma: 3
audibleid wrote:
OR, replace the links inside the addScript(...) with Google's libraries if you don't have the jQuery & UI scripts downloaded in your component (the folders specified in the addScript).

Gez
This was necessary.

It works now, thx.
The administrator has disabled public write access.

Re: Problem with Date Picker 18 Dec 2012 19:09 #6176

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Great,

Glad it helped!

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Problem with Date Picker 19 Dec 2012 15:22 #6192

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
yes, that's what I did ... and while your at it, you might need to add the following if you're getting script errors for validation

$doc->addScript($componentUrlAdmin . '/js/jquery.validationEngine.js');

Unfortunately there doesn't seem to be a way to make this fix in the sandbox (unless I'm missing something?)
The administrator has disabled public write access.

Re: Problem with Date Picker 19 Dec 2012 15:38 #6193

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
The problem is that cook 1.5 will soon be gone so things like the addition of jQuery and other features that have appeared during the beta of cook2.0 may work or not.

Apologies for that! All efforts from admin are concentrating on stabilising v2.0 right now...

Best option is to switch to version 2.0 for developing if you can. But, DON'T do that on an existing project if possible. Some wizards conflict when switching as many have already been re-written in 2.0b.

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Problem with Date Picker 19 Dec 2012 15:43 #6194

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
Wondered about 2.0 and I have a rather large project (at least in my mind) under 1.5 so glad to know the wizards might break if I just try to switch to 2.0
The administrator has disabled public write access.

Re: Problem with Date Picker 19 Dec 2012 16:02 #6197

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
authoring/publishing could be particularly problematic from memory...

It's to do with how they are named + they config (under the hood). Publishing is now an int as opposed to a bool for instance.

Before you commit to making the upgrade of your project, search the forum for variations of 'switch to v2.0' and I'm sure you'll find what you're looking for. Also, in case its helpful to search by author, try my username or jcbenton to narrow your results.

Good luck!

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: [SOLVED] Problem with Date Picker 11 Jan 2013 14:15 #6407

I replaced with Google libraries:

$doc->addScript('ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js');
// Mootools non conflict is handled here :
$doc->addScriptDeclaration("var Moo = document.id;");

$doc->addScript('//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js');
// Mootools non conflict is handled here :
$doc->addScriptDeclaration("var Moo = document.id;");


I tried both!
and still does not work the calendar pickup on backend !
The administrator has disabled public write access.
Time to create page: 0.128 seconds

Get Started