jQuery UI datepicker issue

Creative, responsive and unique Joomla template to create personal portfolio website with amazing animations and clean design.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Jan 14, 2015 11:19 am
Reply with quote
Report this post
Hi,

I've included custom javascript to this template by adding in head.php.

Code: Select all
$this->API->addJS($this->API->URLtemplate() . '/js/modernizr.js');
$this->API->addJS($this->API->URLtemplate() . '/js/gk.scripts.js');
$this->API->addJS($this->API->URLtemplate() . '/js/gk.menu.js');
$this->API->addJS($this->API->URLtemplate() . '/js/scrollreveal.js');
$this->API->addJS($this->API->URLtemplate() . '/js/jquery-ui-1.11.2/jquery-ui.js');
$this->API->addJS($this->API->URLtemplate() . '/js/plaza.js');


plaza.js is my javascript to load datepicker on two input fields.

Code: Select all
(function($) {
    $(document).ready(function() {
        $("#dp-llegada").datepicker({defaultDate:"+1w",changeMonth:false,dateFormat:"dd/mm/yy",onClose:function(selectedDate){$("#dp-salida").datepicker("option","minDate",selectedDate)}});
        $('#dp-salida').datepicker();
        $('#ui-datepicker-div').css('clip', 'auto');
    });
})(jQuery);


But when I click on input fields datepicker doesn't appear... is there any compatibility problem with jquery ui, datepicker and john template ?

You can take a look at http://webdev.bittingbits.com/hotel-avenida
User avatar
Fresh Boarder

teitbite
Thu Jan 15, 2015 10:32 am
Reply with quote
Report this post
Hi

There coupld be. As far as I know datapicker is a part of jquery-ui.js file already, so it can be a duplication.
User avatar
Moderator

GK User
Thu Jan 15, 2015 11:47 am
Reply with quote
Report this post
Mmm.... I think that this jquery-ui.js is the only one running.... maybe It could be possible that gavick template or Joomla 3.X runs another jquery-ui or another jquery-ui implementation?. I was looking for that on running js... and there's no one called jquery-ui (except mine).
User avatar
Fresh Boarder

teitbite
Fri Jan 16, 2015 7:56 pm
Reply with quote
Report this post
Hi

There is one loaded from joomla, but I can see it's not included. I also cannot see any error message anywhere, so this not looks to be a conflict also. I would check the script outside of the website. Just to see if there is no issue there. I think datepicker doesn't work like that, but had to use it only once and it was a long time ago, so I'm probably wrong. Anyway, good to check to exclude something.
User avatar
Moderator


cron