File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -1017,7 +1017,17 @@ $.datepicker._gotoToday = function(id) {
10171017 var inst = this . _getInst ( $ ( id ) [ 0 ] ) ,
10181018 $dp = inst . dpDiv ;
10191019 this . _base_gotoToday ( id ) ;
1020- this . _setTime ( this . _getInst ( $ ( id ) [ 0 ] ) , new Date ( ) ) ;
1020+ var now = new Date ( ) ;
1021+ var tp_inst = this . _get ( inst , 'timepicker' ) ;
1022+ if ( tp_inst . _defaults . showTimezone && tp_inst . timezone_select ) {
1023+ var tzoffset = now . getTimezoneOffset ( ) ; // If +0100, returns -60
1024+ var tzsign = tzoffset > 0 ? '-' : '+' ;
1025+ tzoffset = Math . abs ( tzoffset ) ;
1026+ var tzmin = tzoffset % 60
1027+ tzoffset = tzsign + ( '0' + ( tzoffset - tzmin ) / 60 ) . slice ( - 2 ) + ( '0' + tzmin ) . slice ( - 2 ) ;
1028+ tp_inst . timezone_select . val ( tzoffset ) ;
1029+ }
1030+ this . _setTime ( inst , now ) ;
10211031 $ ( '.ui-datepicker-today' , $dp ) . click ( ) ;
10221032} ;
10231033
Original file line number Diff line number Diff line change 1+ /* German translation for the jQuery Timepicker Addon */
2+ /* Written by Michał Pena */
3+ ( function ( $ ) {
4+ $ . timepicker . regional [ 'pl' ] = {
5+ timeOnlyTitle : 'Wybierz godzinę' ,
6+ timeText : 'Czas' ,
7+ hourText : 'Godzina' ,
8+ minuteText : 'Minuta' ,
9+ secondText : 'Sekunda' ,
10+ millisecText : 'Milisekunda' ,
11+ timezoneText : 'Strefa czasowa' ,
12+ currentText : 'Teraz' ,
13+ closeText : 'Gotowe' ,
14+ timeFormat : 'hh:mm tt' ,
15+ ampm : false
16+ } ;
17+ $ . timepicker . setDefaults ( $ . timepicker . regional [ 'pl' ] ) ;
18+ } ) ( jQuery ) ;
You can’t perform that action at this time.
0 commit comments