mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Added enterLikeTab option
This commit is contained in:
parent
f49674765a
commit
8d2ef17404
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name":"datetimepicker",
|
"name":"datetimepicker",
|
||||||
"version":"2.3.8",
|
"version":"2.3.9",
|
||||||
"main": [
|
"main": [
|
||||||
"jquery.datetimepicker.js",
|
"jquery.datetimepicker.js",
|
||||||
"jquery.datetimepicker.css"
|
"jquery.datetimepicker.css"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "datetimepicker",
|
"name": "datetimepicker",
|
||||||
"version": "2.3.8",
|
"version": "2.3.9",
|
||||||
"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": [
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* @preserve jQuery DateTimePicker plugin v2.3.8
|
* @preserve jQuery DateTimePicker plugin v2.3.9
|
||||||
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
|
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
|
||||||
* (c) 2014, Chupurnov Valeriy.
|
* (c) 2014, Chupurnov Valeriy.
|
||||||
*/
|
*/
|
||||||
|
/*global document,window,jQuery,setTimeout,clearTimeout*/
|
||||||
(function ($) {
|
(function ($) {
|
||||||
'use strict';
|
'use strict';
|
||||||
var default_options = {
|
var default_options = {
|
||||||
@ -304,7 +305,9 @@
|
|||||||
weekends: [],
|
weekends: [],
|
||||||
disabledDates : [],
|
disabledDates : [],
|
||||||
yearOffset: 0,
|
yearOffset: 0,
|
||||||
beforeShowDay: null
|
beforeShowDay: null,
|
||||||
|
|
||||||
|
enterLikeTab: true
|
||||||
};
|
};
|
||||||
// fix for ie8
|
// fix for ie8
|
||||||
if (!Array.prototype.indexOf) {
|
if (!Array.prototype.indexOf) {
|
||||||
@ -624,8 +627,8 @@
|
|||||||
options.weekends = $.extend(true, [], _options.weekends);
|
options.weekends = $.extend(true, [], _options.weekends);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( _options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length ){
|
if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) {
|
||||||
options.disabledDates = $.extend(true,[],_options.disabledDates);
|
options.disabledDates = $.extend(true, [], _options.disabledDates);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((options.open || options.opened) && (!options.inline)) {
|
if ((options.open || options.opened) && (!options.inline)) {
|
||||||
@ -1544,7 +1547,7 @@
|
|||||||
.on('keydown.xdsoft', function (event) {
|
.on('keydown.xdsoft', function (event) {
|
||||||
var val = this.value, elementSelector,
|
var val = this.value, elementSelector,
|
||||||
key = event.which;
|
key = event.which;
|
||||||
if ([ENTER].indexOf(key) !== -1) {
|
if ([ENTER].indexOf(key) !== -1 && options.enterLikeTab) {
|
||||||
elementSelector = $("input:visible,textarea:visible");
|
elementSelector = $("input:visible,textarea:visible");
|
||||||
datetimepicker.trigger('close.xdsoft');
|
datetimepicker.trigger('close.xdsoft');
|
||||||
elementSelector.eq(elementSelector.index(this) + 1).focus();
|
elementSelector.eq(elementSelector.index(this) + 1).focus();
|
||||||
|
Loading…
Reference in New Issue
Block a user