diff options
author | Keith Wood <kbwood.au@gmail.com> | 2009-07-29 08:33:33 +0000 |
---|---|---|
committer | Keith Wood <kbwood.au@gmail.com> | 2009-07-29 08:33:33 +0000 |
commit | 20e13a4d772466e4cf9b455a76ea9f4d5be1c0b9 (patch) | |
tree | 4e4067d743ba84a4e56afd0df674f8e3145b75e0 | |
parent | e84694a0c456895234b2686aeab72be69f3dbf74 (diff) | |
download | jquery-ui-20e13a4d772466e4cf9b455a76ea9f4d5be1c0b9.tar.gz jquery-ui-20e13a4d772466e4cf9b455a76ea9f4d5be1c0b9.zip |
Datepicker: Fixed #4131 Could week numbers [be] added to the Datepicker
49 files changed, 104 insertions, 4 deletions
diff --git a/demos/datepicker/index.html b/demos/datepicker/index.html index 9cce296e7..f66e0ede3 100644 --- a/demos/datepicker/index.html +++ b/demos/datepicker/index.html @@ -18,6 +18,7 @@ <li><a href="buttonbar.html">Display button bar</a></li> <li><a href="dropdown-month-year.html">Display month & year menus</a></li> <li><a href="other-months.html">Dates in other months</a></li> + <li><a href="show-week.html">Show week of the year</a></li> <li><a href="multiple-calendars.html">Display multiple months</a></li> <li><a href="icon-trigger.html">Icon trigger</a></li> <li><a href="event-search.html">Event Search</a></li> diff --git a/demos/datepicker/show-week.html b/demos/datepicker/show-week.html new file mode 100644 index 000000000..d14c72225 --- /dev/null +++ b/demos/datepicker/show-week.html @@ -0,0 +1,34 @@ +<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Datepicker - Show week of the year</title>
+ <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../../ui/ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/ui.datepicker.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ $("#datepicker").datepicker({showWeek: true, firstDay: 1});
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<p>Date: <input type="text" id="datepicker"></p>
+
+</div><!-- End demo -->
+
+<div class="demo-description">
+
+<p>The datepicker can show the week of the year. The default calculation follows
+ the ISO 8601 definition: the week starts on Monday, the first week of the year
+ contains the first Thursday of the year. This means that some days from one
+ year may be placed into weeks 'belonging' to another year.</p>
+
+</div><!-- End demo-description -->
+
+</body>
+</html>
diff --git a/ui/i18n/ui.datepicker-ar.js b/ui/i18n/ui.datepicker-ar.js index b71412d19..c799b48d8 100644 --- a/ui/i18n/ui.datepicker-ar.js +++ b/ui/i18n/ui.datepicker-ar.js @@ -14,6 +14,7 @@ jQuery(function($){ dayNames: ['السبت', 'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'], dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'], dayNamesMin: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'], + weekHeader: 'أسبوع', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: true, diff --git a/ui/i18n/ui.datepicker-az.js b/ui/i18n/ui.datepicker-az.js index 4640e72cb..b5434057b 100644 --- a/ui/i18n/ui.datepicker-az.js +++ b/ui/i18n/ui.datepicker-az.js @@ -13,6 +13,7 @@ jQuery(function($) { dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'], dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'], dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'], + weekHeader: 'Hf', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-bg.js b/ui/i18n/ui.datepicker-bg.js index 984da7b71..b5113f781 100644 --- a/ui/i18n/ui.datepicker-bg.js +++ b/ui/i18n/ui.datepicker-bg.js @@ -14,6 +14,7 @@ jQuery(function($){ dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'], dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'], dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'], + weekHeader: 'Wk', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-ca.js b/ui/i18n/ui.datepicker-ca.js index f4a391aea..b128e699e 100644 --- a/ui/i18n/ui.datepicker-ca.js +++ b/ui/i18n/ui.datepicker-ca.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'], dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'], dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'], + weekHeader: 'Sm', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-cs.js b/ui/i18n/ui.datepicker-cs.js index 90d54be90..c3c07ea67 100644 --- a/ui/i18n/ui.datepicker-cs.js +++ b/ui/i18n/ui.datepicker-cs.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'], dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'], dayNamesMin: ['ne','po','út','st','čt','pá','so'], + weekHeader: 'Týd', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-da.js b/ui/i18n/ui.datepicker-da.js index 93b5340aa..8ab7c339d 100644 --- a/ui/i18n/ui.datepicker-da.js +++ b/ui/i18n/ui.datepicker-da.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], + weekHeader: 'Uge', dateFormat: 'dd-mm-yy', firstDay: 0, isRTL: false, diff --git a/ui/i18n/ui.datepicker-de.js b/ui/i18n/ui.datepicker-de.js index d08f207e4..ac2d516aa 100644 --- a/ui/i18n/ui.datepicker-de.js +++ b/ui/i18n/ui.datepicker-de.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], + weekHeader: 'Wo', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-el.js b/ui/i18n/ui.datepicker-el.js index c3390dba2..9542769d9 100644 --- a/ui/i18n/ui.datepicker-el.js +++ b/ui/i18n/ui.datepicker-el.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'], dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'], dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'], + weekHeader: 'Εβδ', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-eo.js b/ui/i18n/ui.datepicker-eo.js index d27f503f5..ba5715687 100644 --- a/ui/i18n/ui.datepicker-eo.js +++ b/ui/i18n/ui.datepicker-eo.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'], dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'], dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'], + weekHeader: 'Sb', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: false, diff --git a/ui/i18n/ui.datepicker-es.js b/ui/i18n/ui.datepicker-es.js index 8ca3711d4..a02133de3 100644 --- a/ui/i18n/ui.datepicker-es.js +++ b/ui/i18n/ui.datepicker-es.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'], dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'], dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'], + weekHeader: 'Sm', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-et.js b/ui/i18n/ui.datepicker-et.js index f23e717da..f97311f31 100644 --- a/ui/i18n/ui.datepicker-et.js +++ b/ui/i18n/ui.datepicker-et.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'], dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'], dayNamesMin: ['P','E','T','K','N','R','L'], + weekHeader: 'Sm', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-eu.js b/ui/i18n/ui.datepicker-eu.js index 57bb14f48..1d7609a24 100644 --- a/ui/i18n/ui.datepicker-eu.js +++ b/ui/i18n/ui.datepicker-eu.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Igandea','Astelehena','Asteartea','Asteazkena','Osteguna','Ostirala','Larunbata'],
dayNamesShort: ['Iga','Ast','Ast','Ast','Ost','Ost','Lar'],
dayNamesMin: ['Ig','As','As','As','Os','Os','La'],
+ weekHeader: 'Wk',
dateFormat: 'yy/mm/dd',
firstDay: 1,
isRTL: false,
diff --git a/ui/i18n/ui.datepicker-fa.js b/ui/i18n/ui.datepicker-fa.js index 77b22ad83..adb3709fe 100644 --- a/ui/i18n/ui.datepicker-fa.js +++ b/ui/i18n/ui.datepicker-fa.js @@ -13,6 +13,7 @@ jQuery(function($) { dayNames: ['يکشنبه','دوشنبه','سهشنبه','چهارشنبه','پنجشنبه','جمعه','شنبه'], dayNamesShort: ['ي','د','س','چ','پ','ج', 'ش'], dayNamesMin: ['ي','د','س','چ','پ','ج', 'ش'], + weekHeader: 'هف', dateFormat: 'yy/mm/dd', firstDay: 6, isRTL: true, diff --git a/ui/i18n/ui.datepicker-fi.js b/ui/i18n/ui.datepicker-fi.js index 900bd60f4..e1f25fd84 100644 --- a/ui/i18n/ui.datepicker-fi.js +++ b/ui/i18n/ui.datepicker-fi.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'], dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'], dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'], + weekHeader: 'Vk', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-fr-CH.js b/ui/i18n/ui.datepicker-fr-CH.js index 0672c482c..9b7234375 100644 --- a/ui/i18n/ui.datepicker-fr-CH.js +++ b/ui/i18n/ui.datepicker-fr-CH.js @@ -1,7 +1,23 @@ /* Swiss-French initialisation for the jQuery UI date picker plugin. */
/* Written Martin Voelkle (martin.voelkle@e-tc.ch). */
jQuery(function($){
- $.datepicker.regional['fr-CH'] =
- $.extend({}, $.datepicker.regional['fr'], {dateFormat: 'dd.mm.yy'});
+ $.datepicker.regional['fr-CH'] = {
+ closeText: 'Fermer',
+ prevText: '<Prc',
+ nextText: 'Suiv>',
+ currentText: 'Courant',
+ monthNames: ['Janvier','Fvrier','Mars','Avril','Mai','Juin',
+ 'Juillet','Aot','Septembre','Octobre','Novembre','Dcembre'],
+ monthNamesShort: ['Jan','Fv','Mar','Avr','Mai','Jun',
+ 'Jul','Ao','Sep','Oct','Nov','Dc'],
+ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
+ dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
+ dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
$.datepicker.setDefaults($.datepicker.regional['fr-CH']);
});
\ No newline at end of file diff --git a/ui/i18n/ui.datepicker-fr.js b/ui/i18n/ui.datepicker-fr.js index 12c747739..134bda65d 100644 --- a/ui/i18n/ui.datepicker-fr.js +++ b/ui/i18n/ui.datepicker-fr.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'], dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'], + weekHeader: 'Sm', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-he.js b/ui/i18n/ui.datepicker-he.js index 0b080fb3f..3b3dc387f 100644 --- a/ui/i18n/ui.datepicker-he.js +++ b/ui/i18n/ui.datepicker-he.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'], dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], + weekHeader: 'Wk', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: true, diff --git a/ui/i18n/ui.datepicker-hr.js b/ui/i18n/ui.datepicker-hr.js index 852bbd111..0285c1aa9 100644 --- a/ui/i18n/ui.datepicker-hr.js +++ b/ui/i18n/ui.datepicker-hr.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'], dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'], dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], + weekHeader: 'Tje', dateFormat: 'dd.mm.yy.', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-hu.js b/ui/i18n/ui.datepicker-hu.js index c4f11984c..249e7b0ef 100644 --- a/ui/i18n/ui.datepicker-hu.js +++ b/ui/i18n/ui.datepicker-hu.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Vasárnap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'], dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'], dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'], + weekHeader: 'Hé', dateFormat: 'yy-mm-dd', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-hy.js b/ui/i18n/ui.datepicker-hy.js index 3e6f73352..c6cc1946c 100644 --- a/ui/i18n/ui.datepicker-hy.js +++ b/ui/i18n/ui.datepicker-hy.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'], dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'], dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'], + weekHeader: 'ՇԲՏ', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-id.js b/ui/i18n/ui.datepicker-id.js index de57eeefe..c626fbb7b 100644 --- a/ui/i18n/ui.datepicker-id.js +++ b/ui/i18n/ui.datepicker-id.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'], dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'], dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'], + weekHeader: 'Mg', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: false, diff --git a/ui/i18n/ui.datepicker-is.js b/ui/i18n/ui.datepicker-is.js index 53accedf6..c53235a49 100644 --- a/ui/i18n/ui.datepicker-is.js +++ b/ui/i18n/ui.datepicker-is.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'], dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'], dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'], + weekHeader: 'Vika', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: false, diff --git a/ui/i18n/ui.datepicker-it.js b/ui/i18n/ui.datepicker-it.js index b1885b9c2..59da2df67 100644 --- a/ui/i18n/ui.datepicker-it.js +++ b/ui/i18n/ui.datepicker-it.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'], dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'], dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'], + weekHeader: 'Sm', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-ja.js b/ui/i18n/ui.datepicker-ja.js index 7da88d43a..79cd827c7 100644 --- a/ui/i18n/ui.datepicker-ja.js +++ b/ui/i18n/ui.datepicker-ja.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'], dayNamesShort: ['日','月','火','水','木','金','土'], dayNamesMin: ['日','月','火','水','木','金','土'], + weekHeader: '週', dateFormat: 'yy/mm/dd', firstDay: 0, isRTL: false, diff --git a/ui/i18n/ui.datepicker-ko.js b/ui/i18n/ui.datepicker-ko.js index 14767c570..b0d2f7b13 100644 --- a/ui/i18n/ui.datepicker-ko.js +++ b/ui/i18n/ui.datepicker-ko.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['일','월','화','수','목','금','토'], dayNamesShort: ['일','월','화','수','목','금','토'], dayNamesMin: ['일','월','화','수','목','금','토'], + weekHeader: 'Wk', dateFormat: 'yy-mm-dd', firstDay: 0, isRTL: false, diff --git a/ui/i18n/ui.datepicker-lt.js b/ui/i18n/ui.datepicker-lt.js index 9e6a174fe..67d5119ca 100644 --- a/ui/i18n/ui.datepicker-lt.js +++ b/ui/i18n/ui.datepicker-lt.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'], dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'], dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'], + weekHeader: 'Wk', dateFormat: 'yy-mm-dd', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-lv.js b/ui/i18n/ui.datepicker-lv.js index 00bc8f713..003934e72 100644 --- a/ui/i18n/ui.datepicker-lv.js +++ b/ui/i18n/ui.datepicker-lv.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'], dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'], dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'], + weekHeader: 'Nav', dateFormat: 'dd-mm-yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-ms.js b/ui/i18n/ui.datepicker-ms.js index adca358d1..e953ac04f 100644 --- a/ui/i18n/ui.datepicker-ms.js +++ b/ui/i18n/ui.datepicker-ms.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'], dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'], dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'], + weekHeader: 'Mg', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: false, diff --git a/ui/i18n/ui.datepicker-nl.js b/ui/i18n/ui.datepicker-nl.js index 7e1f6fc6e..663d6bb26 100644 --- a/ui/i18n/ui.datepicker-nl.js +++ b/ui/i18n/ui.datepicker-nl.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'], dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], + weekHeader: 'Wk', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-no.js b/ui/i18n/ui.datepicker-no.js index 22fe7ba23..3a490da4e 100644 --- a/ui/i18n/ui.datepicker-no.js +++ b/ui/i18n/ui.datepicker-no.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], + weekHeader: 'Uke' dateFormat: 'yy-mm-dd', firstDay: 0, isRTL: false, diff --git a/ui/i18n/ui.datepicker-pl.js b/ui/i18n/ui.datepicker-pl.js index 8cd971dd6..2d2d4d765 100644 --- a/ui/i18n/ui.datepicker-pl.js +++ b/ui/i18n/ui.datepicker-pl.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Niedziela','Poniedzialek','Wtorek','Środa','Czwartek','Piątek','Sobota'], dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'], dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'], + weekHeader: 'Tydz', dateFormat: 'yy-mm-dd', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-pt-BR.js b/ui/i18n/ui.datepicker-pt-BR.js index a35a63bf1..38818637d 100644 --- a/ui/i18n/ui.datepicker-pt-BR.js +++ b/ui/i18n/ui.datepicker-pt-BR.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sabado'], dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'], dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'], + weekHeader: 'Sm', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: false, diff --git a/ui/i18n/ui.datepicker-ro.js b/ui/i18n/ui.datepicker-ro.js index c833abc39..acb2e4499 100644 --- a/ui/i18n/ui.datepicker-ro.js +++ b/ui/i18n/ui.datepicker-ro.js @@ -16,6 +16,7 @@ jQuery(function($){ dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'], dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'], dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'], + weekHeader: 'Sapt', dateFormat: 'dd MM yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-ru.js b/ui/i18n/ui.datepicker-ru.js index 2c5cfa256..b8091f9ec 100644 --- a/ui/i18n/ui.datepicker-ru.js +++ b/ui/i18n/ui.datepicker-ru.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'], dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'], dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'], + weekHeader: 'Не', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-sk.js b/ui/i18n/ui.datepicker-sk.js index 9b034aa15..e8e73e671 100644 --- a/ui/i18n/ui.datepicker-sk.js +++ b/ui/i18n/ui.datepicker-sk.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Nedel\'a','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'], dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'], dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'], + weekHeader: 'Ty', dateFormat: 'dd.mm.yy', firstDay: 0, isRTL: false, diff --git a/ui/i18n/ui.datepicker-sl.js b/ui/i18n/ui.datepicker-sl.js index 4339bde51..516550192 100644 --- a/ui/i18n/ui.datepicker-sl.js +++ b/ui/i18n/ui.datepicker-sl.js @@ -14,6 +14,7 @@ jQuery(function($){ dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'], dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'], dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'], + weekHeader: 'Teden', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-sq.js b/ui/i18n/ui.datepicker-sq.js index 292d41231..be84104c0 100644 --- a/ui/i18n/ui.datepicker-sq.js +++ b/ui/i18n/ui.datepicker-sq.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'], dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'], dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'], + weekHeader: 'Ja', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-sr-SR.js b/ui/i18n/ui.datepicker-sr-SR.js index 35e58c145..ac779dd18 100644 --- a/ui/i18n/ui.datepicker-sr-SR.js +++ b/ui/i18n/ui.datepicker-sr-SR.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'],
dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'],
dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
+ weekHeader: 'Sed',
dateFormat: 'dd/mm/yy',
firstDay: 1,
isRTL: false,
diff --git a/ui/i18n/ui.datepicker-sr.js b/ui/i18n/ui.datepicker-sr.js index 8d49f0358..b82964859 100644 --- a/ui/i18n/ui.datepicker-sr.js +++ b/ui/i18n/ui.datepicker-sr.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'],
dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'],
dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'],
+ weekHeader: 'Сед',
dateFormat: 'dd/mm/yy',
firstDay: 1,
isRTL: false,
diff --git a/ui/i18n/ui.datepicker-sv.js b/ui/i18n/ui.datepicker-sv.js index c2a48e7a3..8236b62b5 100644 --- a/ui/i18n/ui.datepicker-sv.js +++ b/ui/i18n/ui.datepicker-sv.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'], dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'], dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'], + weekHeader: 'Ve', dateFormat: 'yy-mm-dd', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-th.js b/ui/i18n/ui.datepicker-th.js index 3f9c7480f..978500ab1 100644 --- a/ui/i18n/ui.datepicker-th.js +++ b/ui/i18n/ui.datepicker-th.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'], dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'], dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'], + weekHeader: 'Wk', dateFormat: 'dd/mm/yy', firstDay: 0, isRTL: false, diff --git a/ui/i18n/ui.datepicker-tr.js b/ui/i18n/ui.datepicker-tr.js index 6a2706f93..dedfc7ff9 100644 --- a/ui/i18n/ui.datepicker-tr.js +++ b/ui/i18n/ui.datepicker-tr.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'], dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], + weekHeader: 'Hf', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-uk.js b/ui/i18n/ui.datepicker-uk.js index 008e41241..112b40e7f 100644 --- a/ui/i18n/ui.datepicker-uk.js +++ b/ui/i18n/ui.datepicker-uk.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'], dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'], dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'], + weekHeader: 'Не', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-vi.js b/ui/i18n/ui.datepicker-vi.js index a0a6befbf..fa97af5fa 100644 --- a/ui/i18n/ui.datepicker-vi.js +++ b/ui/i18n/ui.datepicker-vi.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],
dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
+ weekHeader: 'Tu',
dateFormat: 'dd/mm/yy',
firstDay: 0,
isRTL: false,
diff --git a/ui/i18n/ui.datepicker-zh-CN.js b/ui/i18n/ui.datepicker-zh-CN.js index 6a21f4a48..213aa2dfc 100644 --- a/ui/i18n/ui.datepicker-zh-CN.js +++ b/ui/i18n/ui.datepicker-zh-CN.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], dayNamesMin: ['日','一','二','三','四','五','六'], + weekHeader: '周', dateFormat: 'yy-mm-dd', firstDay: 1, isRTL: false, diff --git a/ui/i18n/ui.datepicker-zh-TW.js b/ui/i18n/ui.datepicker-zh-TW.js index a01c93f8d..1a046f9e8 100644 --- a/ui/i18n/ui.datepicker-zh-TW.js +++ b/ui/i18n/ui.datepicker-zh-TW.js @@ -13,6 +13,7 @@ jQuery(function($){ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], dayNamesMin: ['日','一','二','三','四','五','六'], + weekHeader: '周', dateFormat: 'yy/mm/dd', firstDay: 1, isRTL: false, diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js index 295fd0aba..716e8e2d2 100644 --- a/ui/ui.datepicker.js +++ b/ui/ui.datepicker.js @@ -50,6 +50,7 @@ function Datepicker() { dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday + weekHeader: 'Wk', // Column header for week of the year dateFormat: 'mm/dd/yy', // See format options on parseDate firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... isRTL: false, // True if right-to-left language, false if left-to-right @@ -77,6 +78,7 @@ function Datepicker() { // either relative to current year (-nn:+nn) or absolute (nnnn:nnnn) showOtherMonths: false, // True to show dates in other months, false to leave blank selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable + showWeek: false, // True to show week of the year, false to not show it calculateWeek: this.iso8601Week, // How to calculate the week of the year, // takes a Date and returns the number of the week for it shortYearCutoff: '+10', // Short year values < this are in the current century, @@ -1366,6 +1368,7 @@ $.extend(Datepicker.prototype, { '>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : ''; var firstDay = parseInt(this._get(inst, 'firstDay'),10); firstDay = (isNaN(firstDay) ? 0 : firstDay); + var showWeek = this._get(inst, 'showWeek'); var dayNames = this._get(inst, 'dayNames'); var dayNamesShort = this._get(inst, 'dayNamesShort'); var dayNamesMin = this._get(inst, 'dayNamesMin'); @@ -1399,7 +1402,7 @@ $.extend(Datepicker.prototype, { row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers '</div><table class="ui-datepicker-calendar"><thead>' + '<tr>'; - var thead = ''; + var thead = (showWeek ? '<th class="ui-datepicker-week-col">' + this._get(inst, 'weekHeader') + '</th>' : ''); for (var dow = 0; dow < 7; dow++) { // days of the week var day = (dow + firstDay) % 7; thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' + @@ -1414,7 +1417,8 @@ $.extend(Datepicker.prototype, { var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows calender += '<tr>'; - var tbody = ''; + var tbody = (!showWeek ? '' : '<td class="ui-datepicker-week-col">' + + this._get(inst, 'calculateWeek')(printDate) + '</td>'); for (var dow = 0; dow < 7; dow++) { // create date picker days var daySettings = (beforeShowDay ? beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']); |