new version 2.2.4

Fixed bug with setOptions allowTimes
This commit is contained in:
Valeriy Chupurnov 2014-03-26 23:01:59 +06:00
parent ce4afc0061
commit e54d6517b7
3 changed files with 12 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name":"datetimepicker", "name":"datetimepicker",
"version":"2.2.3", "version":"2.2.4",
"main": [ "main": [
"jquery.datetimepicker.js", "jquery.datetimepicker.js",
"jquery.datetimepicker.css" "jquery.datetimepicker.css"

View File

@ -1,6 +1,6 @@
{ {
"name": "datetimepicker", "name": "datetimepicker",
"version": "2.2.3", "version": "2.2.4",
"title": "jQuery Date and Time picker", "title": "jQuery Date and Time picker",
"description": "jQuery plugin for date, time, or datetime manipulation in form", "description": "jQuery plugin for date, time, or datetime manipulation in form",
"keywords": [ "keywords": [

View File

@ -1,5 +1,5 @@
/** /**
* @preserve jQuery DateTimePicker plugin v2.2.3 * @preserve jQuery DateTimePicker plugin v2.2.4
* @homepage http://xdsoft.net/jqplugins/datetimepicker/ * @homepage http://xdsoft.net/jqplugins/datetimepicker/
* (c) 2014, Chupurnov Valeriy. * (c) 2014, Chupurnov Valeriy.
*/ */
@ -428,6 +428,15 @@
// set options // set options
datetimepicker.setOptions = function( _options ) { datetimepicker.setOptions = function( _options ) {
options = $.extend(true,{},options,_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) ) { if( (options.open||options.opened)&&(!options.inline) ) {
input.trigger('open.xdsoft'); input.trigger('open.xdsoft');
} }