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