mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Standarted code with JSLint
This commit is contained in:
parent
2b0ca6949c
commit
de9300c663
@ -235,29 +235,37 @@
|
|||||||
},
|
},
|
||||||
value: '',
|
value: '',
|
||||||
lang: 'en',
|
lang: 'en',
|
||||||
|
|
||||||
format: 'Y/m/d H:i',
|
format: 'Y/m/d H:i',
|
||||||
formatTime: 'H:i',
|
formatTime: 'H:i',
|
||||||
formatDate: 'Y/m/d',
|
formatDate: 'Y/m/d',
|
||||||
|
|
||||||
startDate: false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05',
|
startDate: false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05',
|
||||||
step: 60,
|
step: 60,
|
||||||
monthChangeSpinner: true,
|
monthChangeSpinner: true,
|
||||||
|
|
||||||
closeOnDateSelect: false,
|
closeOnDateSelect: false,
|
||||||
closeOnWithoutClick: true,
|
closeOnWithoutClick: true,
|
||||||
closeOnInputClick: true,
|
closeOnInputClick: true,
|
||||||
|
|
||||||
timepicker: true,
|
timepicker: true,
|
||||||
datepicker: true,
|
datepicker: true,
|
||||||
weeks: false,
|
weeks: false,
|
||||||
|
|
||||||
defaultTime: false, // use formatTime format (ex. '10:00' for formatTime: 'H:i')
|
defaultTime: false, // use formatTime format (ex. '10:00' for formatTime: 'H:i')
|
||||||
defaultDate: false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05')
|
defaultDate: false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05')
|
||||||
|
|
||||||
minDate: false,
|
minDate: false,
|
||||||
maxDate: false,
|
maxDate: false,
|
||||||
minTime: false,
|
minTime: false,
|
||||||
maxTime: false,
|
maxTime: false,
|
||||||
|
|
||||||
allowTimes: [],
|
allowTimes: [],
|
||||||
opened: false,
|
opened: false,
|
||||||
initTime: true,
|
initTime: true,
|
||||||
inline: false,
|
inline: false,
|
||||||
theme: '',
|
theme: '',
|
||||||
|
|
||||||
onSelectDate: function () {},
|
onSelectDate: function () {},
|
||||||
onSelectTime: function () {},
|
onSelectTime: function () {},
|
||||||
onChangeMonth: function () {},
|
onChangeMonth: function () {},
|
||||||
@ -266,6 +274,7 @@
|
|||||||
onShow: function () {},
|
onShow: function () {},
|
||||||
onClose: function () {},
|
onClose: function () {},
|
||||||
onGenerate: function () {},
|
onGenerate: function () {},
|
||||||
|
|
||||||
withoutCopyright: true,
|
withoutCopyright: true,
|
||||||
inverseButton: false,
|
inverseButton: false,
|
||||||
hours12: false,
|
hours12: false,
|
||||||
@ -277,9 +286,11 @@
|
|||||||
timepickerScrollbar: true,
|
timepickerScrollbar: true,
|
||||||
todayButton: true,
|
todayButton: true,
|
||||||
defaultSelect: true,
|
defaultSelect: true,
|
||||||
|
|
||||||
scrollMonth: true,
|
scrollMonth: true,
|
||||||
scrollTime: true,
|
scrollTime: true,
|
||||||
scrollInput: true,
|
scrollInput: true,
|
||||||
|
|
||||||
lazyInit: false,
|
lazyInit: false,
|
||||||
mask: false,
|
mask: false,
|
||||||
validateOnBlur: true,
|
validateOnBlur: true,
|
||||||
@ -1264,7 +1275,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (options.onSelectDate && $.isFunction(options.onSelectDate)) {
|
if (options.onSelectDate && $.isFunction(options.onSelectDate)) {
|
||||||
options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
|
options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
|
||||||
}
|
}
|
||||||
|
|
||||||
datetimepicker.data('changed', true);
|
datetimepicker.data('changed', true);
|
||||||
@ -1299,7 +1310,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (options.onSelectTime && $.isFunction(options.onSelectTime)) {
|
if (options.onSelectTime && $.isFunction(options.onSelectTime)) {
|
||||||
options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
|
options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
|
||||||
}
|
}
|
||||||
datetimepicker.data('changed', true);
|
datetimepicker.data('changed', true);
|
||||||
datetimepicker.trigger('xchange.xdsoft');
|
datetimepicker.trigger('xchange.xdsoft');
|
||||||
@ -1365,10 +1376,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
datetimepicker
|
datetimepicker
|
||||||
.on('changedatetime.xdsoft', function () {
|
.on('changedatetime.xdsoft', function (event) {
|
||||||
if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) {
|
if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) {
|
||||||
var $input = datetimepicker.data('input');
|
var $input = datetimepicker.data('input');
|
||||||
options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input);
|
options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input, event);
|
||||||
delete options.value;
|
delete options.value;
|
||||||
$input.trigger('change');
|
$input.trigger('change');
|
||||||
}
|
}
|
||||||
@ -1412,10 +1423,10 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
datetimepicker
|
datetimepicker
|
||||||
.on('open.xdsoft', function () {
|
.on('open.xdsoft', function (event) {
|
||||||
var onShow = true;
|
var onShow = true;
|
||||||
if (options.onShow && $.isFunction(options.onShow)) {
|
if (options.onShow && $.isFunction(options.onShow)) {
|
||||||
onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
|
onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
|
||||||
}
|
}
|
||||||
if (onShow !== false) {
|
if (onShow !== false) {
|
||||||
datetimepicker.show();
|
datetimepicker.show();
|
||||||
@ -1439,7 +1450,7 @@
|
|||||||
.find('.xdsoft_select')
|
.find('.xdsoft_select')
|
||||||
.hide();
|
.hide();
|
||||||
if (options.onClose && $.isFunction(options.onClose)) {
|
if (options.onClose && $.isFunction(options.onClose)) {
|
||||||
onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
|
onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
|
||||||
}
|
}
|
||||||
if (onClose !== false && !options.opened && !options.inline) {
|
if (onClose !== false && !options.opened && !options.inline) {
|
||||||
datetimepicker.hide();
|
datetimepicker.hide();
|
||||||
|
Loading…
Reference in New Issue
Block a user