From 9dcc7af839c6407996d1974917f907a48b2055d4 Mon Sep 17 00:00:00 2001 From: Valeriy Chupurnov Date: Fri, 31 Jan 2014 17:12:01 +0600 Subject: [PATCH] New version 2.1.9 Fix bug with popap on bottom window Added Swedish local Custom Local in i18n optione recursive extends --- bower.json | 2 +- datetimepicker.jquery.json | 2 +- jquery.datetimepicker.js | 16 ++++++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/bower.json b/bower.json index d8a8fa5..0a3ce9f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name":"datetimepicker", - "version":"2.1.8", + "version":"2.1.9", "main": [ "jquery.datetimepicker.js", "jquery.datetimepicker.css" diff --git a/datetimepicker.jquery.json b/datetimepicker.jquery.json index 4414631..505964c 100644 --- a/datetimepicker.jquery.json +++ b/datetimepicker.jquery.json @@ -1,6 +1,6 @@ { "name": "datetimepicker", - "version": "2.1.8", + "version": "2.1.9", "title": "jQuery Date and Time picker", "description": "jQuery plugin for date, time, or datetime manipulation in form", "keywords": [ diff --git a/jquery.datetimepicker.js b/jquery.datetimepicker.js index c790358..93d1dca 100644 --- a/jquery.datetimepicker.js +++ b/jquery.datetimepicker.js @@ -1,5 +1,5 @@ /** - * @preserve jQuery DateTimePicker plugin v2.1.8 + * @preserve jQuery DateTimePicker plugin v2.1.9 * @homepage http://xdsoft.net/jqplugins/datetimepicker/ * (c) 2014, Chupurnov Valeriy. */ @@ -94,6 +94,14 @@ dayOfWeek: [ "日", "一","二","三","四","五","六" ] + }, + se:{ // Swedish + months: [ + "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September","Oktober", "November", "December" + ], + dayOfWeek: [ + "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör" + ] } }, value:'', @@ -273,7 +281,7 @@ ZKEY = 90, YKEY = 89, ctrlDown = false, - options = ($.isPlainObject(opt)||!opt)?$.extend({},default_options,opt):$.extend({},default_options), + options = ($.isPlainObject(opt)||!opt)?$.extend(true,{},default_options,opt):$.extend({},default_options), createDateTimePicker = function( input ) { var datetimepicker = $('
'), xdsoft_copyright = $(''), @@ -339,7 +347,7 @@ // set options datetimepicker.setOptions = function( _options ) { - options = $.extend({},options,_options); + options = $.extend(true,{},options,_options); if( (options.open||options.opened)&&(!options.inline) ) { input.trigger('open.xdsoft'); } @@ -943,7 +951,7 @@ }); var setPos = function() { var offset = datetimepicker.data('input').offset(), top = offset.top+datetimepicker.data('input')[0].offsetHeight-1, left = offset.left; - if( top+datetimepicker[0].offsetHeight>$(window).height() ) + if( top+datetimepicker[0].offsetHeight>$(window).height()+$(window).scrollTop() ) top = offset.top-datetimepicker[0].offsetHeight+1; if( left+datetimepicker[0].offsetWidth>$(window).width() ) left = offset.left-datetimepicker[0].offsetWidth+datetimepicker.data('input')[0].offsetWidth;