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",
|
||||
"version":"2.3.8",
|
||||
"version":"2.3.9",
|
||||
"main": [
|
||||
"jquery.datetimepicker.js",
|
||||
"jquery.datetimepicker.css"
|
||||
|
@ -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": [
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user