mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
New version 2.5.4
This commit is contained in:
parent
ac1b591a96
commit
d35c53dd59
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "datetimepicker",
|
"name": "datetimepicker",
|
||||||
"version": "2.5.3",
|
"version": "2.5.4",
|
||||||
"main": [
|
"main": [
|
||||||
"build/jquery.datetimepicker.full.min.js",
|
"build/jquery.datetimepicker.full.min.js",
|
||||||
"jquery.datetimepicker.css"
|
"jquery.datetimepicker.css"
|
||||||
|
@ -575,7 +575,7 @@ var DateFormatter;
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();/**
|
})();/**
|
||||||
* @preserve jQuery DateTimePicker plugin v2.5.3
|
* @preserve jQuery DateTimePicker plugin v2.5.4
|
||||||
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
|
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
|
||||||
* @author Chupurnov Valeriy (<chupurnov@gmail.com>)
|
* @author Chupurnov Valeriy (<chupurnov@gmail.com>)
|
||||||
*/
|
*/
|
||||||
@ -1501,7 +1501,8 @@ var DateFormatter;
|
|||||||
setPos,
|
setPos,
|
||||||
timer = 0,
|
timer = 0,
|
||||||
_xdsoft_datetime,
|
_xdsoft_datetime,
|
||||||
forEachAncestorOf;
|
forEachAncestorOf,
|
||||||
|
throttle;
|
||||||
|
|
||||||
if (options.id) {
|
if (options.id) {
|
||||||
datetimepicker.attr('id', options.id);
|
datetimepicker.attr('id', options.id);
|
||||||
@ -1854,8 +1855,20 @@ var DateFormatter;
|
|||||||
return !isNaN(d.getTime());
|
return !isNaN(d.getTime());
|
||||||
};
|
};
|
||||||
|
|
||||||
_this.setCurrentTime = function (dTime) {
|
_this.setCurrentTime = function (dTime, requireValidDate) {
|
||||||
_this.currentTime = (typeof dTime === 'string') ? _this.strToDateTime(dTime) : _this.isValidDate(dTime) ? dTime : _this.now();
|
if (typeof dTime === 'string') {
|
||||||
|
_this.currentTime = _this.strToDateTime(dTime);
|
||||||
|
}
|
||||||
|
else if (_this.isValidDate(dTime)) {
|
||||||
|
_this.currentTime = dTime;
|
||||||
|
}
|
||||||
|
else if (!dTime && !requireValidDate && options.allowBlank) {
|
||||||
|
_this.currentTime = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_this.currentTime = _this.now();
|
||||||
|
}
|
||||||
|
|
||||||
datetimepicker.trigger('xchange.xdsoft');
|
datetimepicker.trigger('xchange.xdsoft');
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2008,7 +2021,7 @@ var DateFormatter;
|
|||||||
.find('.xdsoft_today_button')
|
.find('.xdsoft_today_button')
|
||||||
.on('touchend mousedown.xdsoft', function () {
|
.on('touchend mousedown.xdsoft', function () {
|
||||||
datetimepicker.data('changed', true);
|
datetimepicker.data('changed', true);
|
||||||
_xdsoft_datetime.setCurrentTime(0);
|
_xdsoft_datetime.setCurrentTime(0, true);
|
||||||
datetimepicker.trigger('afterOpen.xdsoft');
|
datetimepicker.trigger('afterOpen.xdsoft');
|
||||||
}).on('dblclick.xdsoft', function () {
|
}).on('dblclick.xdsoft', function () {
|
||||||
var currentDate = _xdsoft_datetime.getCurrentTime(), minDate, maxDate;
|
var currentDate = _xdsoft_datetime.getCurrentTime(), minDate, maxDate;
|
||||||
@ -2105,6 +2118,10 @@ var DateFormatter;
|
|||||||
xchangeTimer = setTimeout(function () {
|
xchangeTimer = setTimeout(function () {
|
||||||
|
|
||||||
if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
|
if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
|
||||||
|
//In case blanks are allowed, delay construction until we have a valid date
|
||||||
|
if (options.allowBlank)
|
||||||
|
return;
|
||||||
|
|
||||||
_xdsoft_datetime.currentTime = _xdsoft_datetime.now();
|
_xdsoft_datetime.currentTime = _xdsoft_datetime.now();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2830,7 +2847,7 @@ var DateFormatter;
|
|||||||
}
|
}
|
||||||
|
|
||||||
triggerAfterOpen = true;
|
triggerAfterOpen = true;
|
||||||
_xdsoft_datetime.setCurrentTime(getCurrentValue());
|
_xdsoft_datetime.setCurrentTime(getCurrentValue(), true);
|
||||||
if(options.mask) {
|
if(options.mask) {
|
||||||
setMask(options);
|
setMask(options);
|
||||||
}
|
}
|
||||||
|
4
build/jquery.datetimepicker.full.min.js
vendored
4
build/jquery.datetimepicker.full.min.js
vendored
File diff suppressed because one or more lines are too long
4
build/jquery.datetimepicker.min.js
vendored
4
build/jquery.datetimepicker.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "datetimepicker",
|
"name": "datetimepicker",
|
||||||
"version": "2.5.3",
|
"version": "2.5.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": [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @preserve jQuery DateTimePicker plugin v2.5.3
|
* @preserve jQuery DateTimePicker plugin v2.5.4
|
||||||
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
|
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
|
||||||
* @author Chupurnov Valeriy (<chupurnov@gmail.com>)
|
* @author Chupurnov Valeriy (<chupurnov@gmail.com>)
|
||||||
*/
|
*/
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jquery-datetimepicker",
|
"name": "jquery-datetimepicker",
|
||||||
"version": "2.5.3",
|
"version": "2.5.4",
|
||||||
"description": "jQuery Plugin DateTimePicker it is DatePicker and TimePicker in one",
|
"description": "jQuery Plugin DateTimePicker it is DatePicker and TimePicker in one",
|
||||||
"main": "build/jquery.datetimepicker.full.min.js",
|
"main": "build/jquery.datetimepicker.full.min.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -8,7 +8,7 @@
|
|||||||
"concat": "concat-cli -f bower_components/php-date-formatter/js/php-date-formatter.js jquery.datetimepicker.js bower_components/jquery-mousewheel/jquery.mousewheel.js -o build/jquery.datetimepicker.full.js",
|
"concat": "concat-cli -f bower_components/php-date-formatter/js/php-date-formatter.js jquery.datetimepicker.js bower_components/jquery-mousewheel/jquery.mousewheel.js -o build/jquery.datetimepicker.full.js",
|
||||||
"minify": "uglifyjs jquery.datetimepicker.js -c -m -o build/jquery.datetimepicker.min.js && uglifycss jquery.datetimepicker.css > build/jquery.datetimepicker.min.css",
|
"minify": "uglifyjs jquery.datetimepicker.js -c -m -o build/jquery.datetimepicker.min.js && uglifycss jquery.datetimepicker.css > build/jquery.datetimepicker.min.css",
|
||||||
"minifyconcat": "uglifyjs build/jquery.datetimepicker.full.js -c -m -o build/jquery.datetimepicker.full.min.js",
|
"minifyconcat": "uglifyjs build/jquery.datetimepicker.full.js -c -m -o build/jquery.datetimepicker.full.min.js",
|
||||||
"github": "git add --all && git commit -m \"New version %npm_package_version% Fix devDependencies with concat-cli\" && git tag %npm_package_version% && git push --tags origin HEAD:master && npm publish",
|
"github": "git add --all && git commit -m \"New version %npm_package_version% \" && git tag %npm_package_version% && git push --tags origin HEAD:master && npm publish",
|
||||||
"build": "npm run minify && npm run concat && npm run minifyconcat"
|
"build": "npm run minify && npm run concat && npm run minifyconcat"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
Loading…
Reference in New Issue
Block a user