Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Zoho Docs
Google Docs
Each Attachment size should not exceed 1MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Screen name:
gunnarsireus
gunnarsireus's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Ideas
Problems
Expanded view
List view
Private Message
jQuery DatePicker localization
[1Reply]
09-Nov-2012 02:38 PM
Forum:
Using jQuery UI
Hello.
jQuery DatePicker with localization ain't working. I copied the code from www.jquery.com but it's not working.
Can you please check why? Here's the code. You'l find the Swedish and German language files at the bottom of this mail:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Datepicker - Localize calendar</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<script type="text/javascript" src="C:UGunnarDocumentsVisual Studio 2010ProjectssireusmvcSireusmvcScriptsjquery.ui.datepicker-de.js"></script>
<script type="text/javascript" src="C:UGunnarDocumentsVisual Studio 2010ProjectssireusmvcSireusmvcScriptsjquery.ui.datepicker-sv.js"></script>
<script type="text/javascript" src="/scripts/jquery.ui.datepicker-sv.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
$(function() {
$.datepicker.setDefaults( $.datepicker.regional[ "" ] );
$( "#datepicker" ).datepicker( $.datepicker.regional[ "sv" ] );
$( "#locale" ).change(function() {
$( "#datepicker" ).datepicker( "option",
$.datepicker.regional[ $( this ).val() ] );
});
});
</script>
</head>
<body>
<p>Date: <input type="text" id="datepicker" />
<select id="locale">
<option value="de">German (Deutsch)</option>
<option value="sv">Swedish (Svenska)</option>
</select></p>
</body>
</html>
/*
http://keith-wood.name/datepick.html
German localisation for jQuery Datepicker.
Written by Milian Wolff (
mail@milianw.de
). */
(function($) {
$.datepicker.regional['de'] = {
monthNames: ['Januar','Februar','März','April','Mai','Juni',
'Juli','August','September','Oktober','November','Dezember'],
monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
'Jul','Aug','Sep','Okt','Nov','Dez'],
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
dateFormat: 'dd.mm.yyyy', firstDay: 1,
renderer: $.datepick.defaultRenderer,
prevText: '<zurück', prevStatus: 'letzten Monat zeigen',
prevJumpText: '<<', prevJumpStatus: '',
nextText: 'Vor>', nextStatus: 'nächsten Monat zeigen',
nextJumpText: '>>', nextJumpStatus: '',
currentText: 'heute', currentStatus: '',
todayText: 'heute', todayStatus: '',
clearText: 'löschen', clearStatus: 'aktuelles Datum löschen',
closeText: 'schließen', closeStatus: 'ohne Änderungen schließen',
yearStatus: 'anderes Jahr anzeigen', monthStatus: 'anderen Monat anzeigen',
weekText: 'Wo', weekStatus: 'Woche des Monats',
dayStatus: 'Wähle D, M d', defaultStatus: 'Wähle ein Datum',
isRTL: false
};
$.datepick.setDefaults($.datepicker.regional['de']);
})(jQuery);
/*
http://keith-wood.name/datepick.html
Swedish localisation for jQuery Datepicker.
Written by Anders Ekdahl (
anders@nomadiz.se
). */
(function($) {
$.datepicker.regional['sv'] = {
monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
'Juli','Augusti','September','Oktober','November','December'],
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
'Jul','Aug','Sep','Okt','Nov','Dec'],
dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
dateFormat: 'yyyy-mm-dd', firstDay: 1,
renderer: $.datepick.defaultRenderer,
prevText: '«Förra', prevStatus: '',
prevJumpText: '<<', prevJumpStatus: '',
nextText: 'Nästa»', nextStatus: '',
nextJumpText: '>>', nextJumpStatus: '',
currentText: 'Idag', currentStatus: '',
todayText: 'Idag', todayStatus: '',
clearText: 'Rensa', clearStatus: '',
closeText: 'Stäng', closeStatus: '',
yearStatus: '', monthStatus: '',
weekText: 'Ve', weekStatus: '',
dayStatus: 'D, M d', defauktStatus: '',
isRTL: false
};
$.datepick.setDefaults($.datepicker.regional['sv']);
})(jQuery);
«Prev
Next »
Moderate user : gunnarsireus
Forum