1 Replies - 2345 Views - Last Post: 09 October 2012 - 10:19 AM

#1 germanizer  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 09-October 12

Joomla and jQuery Datepicker

Posted 09 October 2012 - 09:38 AM

I'm rather new to custom php coding within Joomla and I'm also trying to get a date picker popup to work and I'm not sure where to insert the function code.

I have the following code to load the .js files, and they're showing up right in the code (between opening/closing header tag)

$doc =& JFactory::getDocument();
$doc->addScript( JURI::root( true ).'scripts/js/jquery.datePicker-min.js' );
$doc->addScript( JURI::root( true ).'scripts/js/jquery-1.6.1.min.js' );
$doc->addStyleSheet( JURI::root( true ).'scripts/css/datePicker.css' );



If I have the above code, where does the function code go? right underneath?

$doc->addScriptDeclaration('
			$(function () {
			$('.date-pick').datePicker(
            {clickInput:true});
}); ');



I've tried that, but I haven't been able to produce anything yet - either I get an internal server error 500 or a blank page.

Any help on this is greatly appreciated :)

Is This A Good Question/Topic? 0
  • +

Replies To: Joomla and jQuery Datepicker

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10647
  • View blog
  • Posts: 39,540
  • Joined: 27-December 08

Re: Joomla and jQuery Datepicker

Posted 09 October 2012 - 10:19 AM

Topic split. Please open your own threads for your questions rather than tagging onto existing threads. Thank you! :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1