From e54d6517b7baf50f23504a972a5d9868f90dd5ab Mon Sep 17 00:00:00 2001 From: Valeriy Chupurnov Date: Wed, 26 Mar 2014 23:01:59 +0600 Subject: [PATCH] new version 2.2.4 Fixed bug with setOptions allowTimes --- bower.json | 2 +- datetimepicker.jquery.json | 2 +- jquery.datetimepicker.js | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 88f5164..9f411d1 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name":"datetimepicker", - "version":"2.2.3", + "version":"2.2.4", "main": [ "jquery.datetimepicker.js", "jquery.datetimepicker.css" diff --git a/datetimepicker.jquery.json b/datetimepicker.jquery.json index c45257e..29b5a67 100644 --- a/datetimepicker.jquery.json +++ b/datetimepicker.jquery.json @@ -1,6 +1,6 @@ { "name": "datetimepicker", - "version": "2.2.3", + "version": "2.2.4", "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 95f9476..a49e5ef 100644 --- a/jquery.datetimepicker.js +++ b/jquery.datetimepicker.js @@ -1,5 +1,5 @@ /** - * @preserve jQuery DateTimePicker plugin v2.2.3 + * @preserve jQuery DateTimePicker plugin v2.2.4 * @homepage http://xdsoft.net/jqplugins/datetimepicker/ * (c) 2014, Chupurnov Valeriy. */ @@ -428,6 +428,15 @@ // set options datetimepicker.setOptions = function( _options ) { options = $.extend(true,{},options,_options); + + if( _options.allowTimes && $.isArray(_options.allowTimes) && _options.allowTimes.length ){ + options['allowTimes'] = $.extend(true,[],_options.allowTimes); + } + + if( _options.weekends && $.isArray(_options.weekends) && _options.weekends.length ){ + options['weekends'] = $.extend(true,[],_options.weekends); + } + if( (options.open||options.opened)&&(!options.inline) ) { input.trigger('open.xdsoft'); }