File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ <h2>Older Templates:</h2>
67
67
}
68
68
} ) ;
69
69
$ ( "#datepicker-inline" ) . datepicker ( {
70
- tmpl : "#ui-datepicker-weeks-tmpl" ,
70
+ showWeek : true ,
71
71
select : function ( event , ui ) {
72
72
$ ( "#inline-output" ) . val ( ui . date ) ;
73
73
} ,
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ $.widget( "ui.datepicker", {
19
19
my : "left top" ,
20
20
at : "left bottom"
21
21
} ,
22
+ showWeek : false ,
22
23
show : true ,
23
24
hide : true ,
24
25
@@ -326,7 +327,12 @@ $.widget( "ui.datepicker", {
326
327
} ,
327
328
_buildGridHeading : function ( ) {
328
329
var cells = "" ,
329
- i = 0 ;
330
+ i = 0 ,
331
+ labels = Globalize . localize ( "datepicker" ) ;
332
+
333
+ if ( this . options . showWeek ) {
334
+ cells += "<th>" + labels . weekHeader + "</th>" ;
335
+ }
330
336
for ( i ; i < this . date . weekdays ( ) . length ; i ++ ) {
331
337
cells += this . _buildGridHeaderCell ( this . date . weekdays ( ) [ i ] ) ;
332
338
}
@@ -352,6 +358,10 @@ $.widget( "ui.datepicker", {
352
358
_buildWeekRow : function ( week ) {
353
359
var cells = "" ,
354
360
i = 0 ;
361
+
362
+ if ( this . options . showWeek ) {
363
+ cells += "<td>" + week . number + "</td>" ;
364
+ }
355
365
for ( i ; i < week . days . length ; i ++ ) {
356
366
cells += this . _buildDayCell ( week . days [ i ] ) ;
357
367
}
You can’t perform that action at this time.
0 commit comments