Added enterLikeTab option

This commit is contained in:
Valeriy 2014-10-23 17:55:01 +06:00
parent f49674765a
commit 8d2ef17404
3 changed files with 12 additions and 9 deletions

View File

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

View File

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

View File

@ -1,8 +1,9 @@
/**
* @preserve jQuery DateTimePicker plugin v2.3.8
* @preserve jQuery DateTimePicker plugin v2.3.9
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
* (c) 2014, Chupurnov Valeriy.
*/
/*global document,window,jQuery,setTimeout,clearTimeout*/
(function ($) {
'use strict';
var default_options = {
@ -304,7 +305,9 @@
weekends: [],
disabledDates : [],
yearOffset: 0,
beforeShowDay: null
beforeShowDay: null,
enterLikeTab: true
};
// fix for ie8
if (!Array.prototype.indexOf) {
@ -1544,7 +1547,7 @@
.on('keydown.xdsoft', function (event) {
var val = this.value, elementSelector,
key = event.which;
if ([ENTER].indexOf(key) !== -1) {
if ([ENTER].indexOf(key) !== -1 && options.enterLikeTab) {
elementSelector = $("input:visible,textarea:visible");
datetimepicker.trigger('close.xdsoft');
elementSelector.eq(elementSelector.index(this) + 1).focus();