Hello,
I got completely confused with scripts and how they load :( Currently, my date picker doesn't work.
I'm using latest jquery and jqueryui libraries. I load them in functions.php as following:
add_action( 'wp_enqueue_scripts', 'dlfrw_enqueue_scripts', 1 );
function dlfrw_enqueue_scripts() {
// general jquery & other libraries include
if( !is_admin() ){
wp_deregister_script('jquery');
wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', false, '1.9.1');
wp_register_script('jqueryui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js', array('jquery'), '1.10.0');
wp_enqueue_script('jquery');
wp_enqueue_script('jqueryui');
}
}
When I click on the date picker, I get the following JS error:
Uncaught TypeError: Cannot read property 'msie' of undefined ui.datepicker.js:1532
$.extend._generateHTML ui.datepicker.js:1532
$.extend._updateDatepicker ui.datepicker.js:616
$.extend._showDatepicker ui.datepicker.js:582
(anonymous function) ui.datepicker.js:222
b.event.dispatch jquery.min.js:3
v.handle jquery.min.js:3
I've noticed that this erros is coming from ui.datepicker.js v1.6 script that GF loads itself. I've tried to wp_deregister_script that script, but with no luck.
How can I fix it please?
WP: 3.5.1
GF: 1.6.12