Hi,
I'm trying to build webpage using jQuery datepicker, but i'm stuck with localization. I know that datepicker has translated to Finnish but i'm not able to get it working. Can you guys point me what i'm doing wrong. I remove < tags so filter doesen't filter my code away. :)
link type="text/css" href="css/themename/jquery-ui-1.7.1.custom.css" rel="Stylesheet" />
script type="text/javascript" src="js/jquery-1.3.2.min.js"
script type="text/javascript" src="js/jquery-ui-1.7.1.custom.min.js">
script type="text/javascript" src="jquery.ui.datepicker-fi.js">
script type="text/javascript">
$(document).ready(function() {
$.datepicker.setDefaults($.datepicker.regional['']);
$('#date').datepicker($.datepicker.regional['fi']);
});
/script>
form method="post" action="php $_PHP_SELF ">
input type="text" name="date" id="date" />
input type="submit" value="TALLENNA" name="tallennus">
br>
?php
jquery_ui_add(array('ui.datepicker'));
drupal_add_js('$(document).ready(function(){$("#date").datepicker();});','inline');
drupal_add_css("sites/all/modules/jquery_ui/jquery.ui/themes/default/ui.datepicker.css");
if($_POST["tallennus"])
{
print $_POST[date];
}
?
Comments
Answer
Here is answer to my own question. :) i have also removed < so code remain visible.
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
html lang="fi">
head>
/head>
body>
form method="post" action=".">
input type="text" name="date" id="date" />
input type="submit" value="TALLENNA" name="tallennus">
/form>
script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js">
script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js">
script type="text/javascript" src="/modules/jquery_ui/jquery.ui/ui/i18n/ui.datepicker-fi.js">
// on this line change fi to your language and remove this text allso becouse comment doest work on html
script type="text/javascript">
$(document).ready(function() {
$.datepicker.setDefaults($.datepicker.regional['']);
$('#date').datepicker($.datepicker.regional['fi']); // same change here
});
/script>
/body>
/html>