Hi again,
I am sorry but I cannot make it work.
I placed the file jquery.ui.datepicker-sv.js in mydomain.com/wp-content/plugins/gravityforms/js/
Then I added the following code to functions.php
add_action("gform_enqueue_scripts", "enqueue_custom_script", 10, 2);
function enqueue_custom_script($form, $is_ajax){
if($is_ajax){
wp_enqueue_script("custom_script", "http://www.mydomain.com/wp-content/plugins/gravityforms/js/jquery.ui.datepicker-sv.js");
}
}
No result.
Then I added the second code to header.php file of the the Genesis framework from Studiopress.
<?php
/*
WARNING: This file is part of the core Genesis framework. DO NOT edit
this file under any circumstances. Please do all modifications
in the form of a child theme.
*/
/**
* Handles the header structure.
*
* This file is a core Genesis file and should not be edited.
*
* @category Genesis
* @package Templates
* @author StudioPress
* @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
* @link http://www.studiopress.com/themes/genesis
*/
do_action( 'genesis_doctype' );
do_action( 'genesis_title' );
do_action( 'genesis_meta' );
wp_head(); /** we need this for plugins **/
?>
<script type="text/javascript">
jQuery(document).ready(function($) {
$.datepicker.setDefaults($.datepicker.regional["sv"]);
});
</script>
</head>
<body <?php body_class(); ?>>
<?php
do_action( 'genesis_before' );
?>
<div id="wrap">
<?php
do_action( 'genesis_before_header' );
do_action( 'genesis_header' );
do_action( 'genesis_after_header' );
echo '<div id="inner">';
genesis_structural_wrap( 'inner' );
But still the dates show up in the English language.
As I have mentioned before - my knowledge of working with scripts is really limited and obviously I do something completely wrong here. So further help is appreciated.
Regards
Dale
Posted 12 years ago on Thursday May 31, 2012 |
Permalink