Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

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

Please Log in or Create an account to join the conversation.

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

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.
The following user(s) said Thank You: JoomGuy

Please Log in or Create an account to join the conversation.

Last edit: by dyoungers.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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!!!

Please Log in or Create an account to join the conversation.

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

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 following user(s) said Thank You: JoomGuy

Please Log in or Create an account to join the conversation.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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!!!

Please Log in or Create an account to join the conversation.

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

Hello,

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

Cheers

Please Log in or Create an account to join the conversation.

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

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

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 following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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 following user(s) said Thank You: zutiste

Please Log in or Create an account to join the conversation.

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

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.

Please Log in or Create an account to join the conversation.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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!!!

Please Log in or Create an account to join the conversation.

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

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?)

Please Log in or Create an account to join the conversation.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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!!!

Please Log in or Create an account to join the conversation.

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

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

Please Log in or Create an account to join the conversation.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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!!!

Please Log in or Create an account to join the conversation.

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 !

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.100 seconds
  let me say what a brilliant app! Thank you very very much for all the hard work to build Cook!
Tocpe (Forum)

Get Started