mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
commit
16a1beeef3
@ -1480,7 +1480,7 @@ var DateFormatter;
|
|||||||
var datetimepicker = $('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),
|
var datetimepicker = $('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),
|
||||||
xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
|
xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
|
||||||
datepicker = $('<div class="xdsoft_datepicker active"></div>'),
|
datepicker = $('<div class="xdsoft_datepicker active"></div>'),
|
||||||
mounth_picker = $('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>' +
|
month_picker = $('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>' +
|
||||||
'<div class="xdsoft_label xdsoft_month"><span></span><i></i></div>' +
|
'<div class="xdsoft_label xdsoft_month"><span></span><i></i></div>' +
|
||||||
'<div class="xdsoft_label xdsoft_year"><span></span><i></i></div>' +
|
'<div class="xdsoft_label xdsoft_year"><span></span><i></i></div>' +
|
||||||
'<button type="button" class="xdsoft_next"></button></div>'),
|
'<button type="button" class="xdsoft_next"></button></div>'),
|
||||||
@ -1520,14 +1520,14 @@ var DateFormatter;
|
|||||||
datetimepicker.addClass('xdsoft_' + options.theme);
|
datetimepicker.addClass('xdsoft_' + options.theme);
|
||||||
datetimepicker.addClass(options.className);
|
datetimepicker.addClass(options.className);
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_month span')
|
.find('.xdsoft_month span')
|
||||||
.after(monthselect);
|
.after(monthselect);
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_year span')
|
.find('.xdsoft_year span')
|
||||||
.after(yearselect);
|
.after(yearselect);
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_month,.xdsoft_year')
|
.find('.xdsoft_month,.xdsoft_year')
|
||||||
.on('touchstart mousedown.xdsoft', function (event) {
|
.on('touchstart mousedown.xdsoft', function (event) {
|
||||||
var select = $(this).find('.xdsoft_select').eq(0),
|
var select = $(this).find('.xdsoft_select').eq(0),
|
||||||
@ -1537,7 +1537,7 @@ var DateFormatter;
|
|||||||
items,
|
items,
|
||||||
i;
|
i;
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_select')
|
.find('.xdsoft_select')
|
||||||
.hide();
|
.hide();
|
||||||
if (_xdsoft_datetime.currentTime) {
|
if (_xdsoft_datetime.currentTime) {
|
||||||
@ -1558,7 +1558,7 @@ var DateFormatter;
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_select')
|
.find('.xdsoft_select')
|
||||||
.xdsoftScroller()
|
.xdsoftScroller()
|
||||||
.on('touchstart mousedown.xdsoft', function (event) {
|
.on('touchstart mousedown.xdsoft', function (event) {
|
||||||
@ -1735,15 +1735,15 @@ var DateFormatter;
|
|||||||
|
|
||||||
applyButton.toggle(options.showApplyButton);
|
applyButton.toggle(options.showApplyButton);
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_today_button')
|
.find('.xdsoft_today_button')
|
||||||
.css('visibility', !options.todayButton ? 'hidden' : 'visible');
|
.css('visibility', !options.todayButton ? 'hidden' : 'visible');
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.' + options.prev)
|
.find('.' + options.prev)
|
||||||
.css('visibility', !options.prevButton ? 'hidden' : 'visible');
|
.css('visibility', !options.prevButton ? 'hidden' : 'visible');
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.' + options.next)
|
.find('.' + options.next)
|
||||||
.css('visibility', !options.nextButton ? 'hidden' : 'visible');
|
.css('visibility', !options.nextButton ? 'hidden' : 'visible');
|
||||||
|
|
||||||
@ -1815,7 +1815,7 @@ var DateFormatter;
|
|||||||
}
|
}
|
||||||
|
|
||||||
datepicker
|
datepicker
|
||||||
.append(mounth_picker)
|
.append(month_picker)
|
||||||
.append(calendar)
|
.append(calendar)
|
||||||
.append(applyButton);
|
.append(applyButton);
|
||||||
|
|
||||||
@ -2017,7 +2017,7 @@ var DateFormatter;
|
|||||||
input.val(_xdsoft_datetime.str());
|
input.val(_xdsoft_datetime.str());
|
||||||
datetimepicker.trigger('close.xdsoft');
|
datetimepicker.trigger('close.xdsoft');
|
||||||
});
|
});
|
||||||
mounth_picker
|
month_picker
|
||||||
.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);
|
||||||
@ -2040,7 +2040,7 @@ var DateFormatter;
|
|||||||
input.trigger('change');
|
input.trigger('change');
|
||||||
datetimepicker.trigger('close.xdsoft');
|
datetimepicker.trigger('close.xdsoft');
|
||||||
});
|
});
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_prev,.xdsoft_next')
|
.find('.xdsoft_prev,.xdsoft_next')
|
||||||
.on('touchend mousedown.xdsoft', function () {
|
.on('touchend mousedown.xdsoft', function () {
|
||||||
var $this = $(this),
|
var $this = $(this),
|
||||||
@ -2263,8 +2263,8 @@ var DateFormatter;
|
|||||||
|
|
||||||
calendar.html(table);
|
calendar.html(table);
|
||||||
|
|
||||||
mounth_picker.find('.xdsoft_label span').eq(0).text(options.i18n[globalLocale].months[_xdsoft_datetime.currentTime.getMonth()]);
|
month_picker.find('.xdsoft_label span').eq(0).text(options.i18n[globalLocale].months[_xdsoft_datetime.currentTime.getMonth()]);
|
||||||
mounth_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear());
|
month_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear());
|
||||||
|
|
||||||
// generate timebox
|
// generate timebox
|
||||||
time = '';
|
time = '';
|
||||||
@ -2650,7 +2650,7 @@ var DateFormatter;
|
|||||||
})
|
})
|
||||||
.on('close.xdsoft', function (event) {
|
.on('close.xdsoft', function (event) {
|
||||||
var onClose = true;
|
var onClose = true;
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_month,.xdsoft_year')
|
.find('.xdsoft_month,.xdsoft_year')
|
||||||
.find('.xdsoft_select')
|
.find('.xdsoft_select')
|
||||||
.hide();
|
.hide();
|
||||||
|
2
build/jquery.datetimepicker.full.min.js
vendored
2
build/jquery.datetimepicker.full.min.js
vendored
File diff suppressed because one or more lines are too long
2
build/jquery.datetimepicker.min.css
vendored
2
build/jquery.datetimepicker.min.css
vendored
File diff suppressed because one or more lines are too long
2
build/jquery.datetimepicker.min.js
vendored
2
build/jquery.datetimepicker.min.js
vendored
File diff suppressed because one or more lines are too long
@ -102,7 +102,7 @@
|
|||||||
margin-bottom: 3px
|
margin-bottom: 3px
|
||||||
}
|
}
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_mounthpicker {
|
.xdsoft_datetimepicker .xdsoft_monthpicker {
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
@ -904,7 +904,7 @@
|
|||||||
var datetimepicker = $('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),
|
var datetimepicker = $('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),
|
||||||
xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
|
xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
|
||||||
datepicker = $('<div class="xdsoft_datepicker active"></div>'),
|
datepicker = $('<div class="xdsoft_datepicker active"></div>'),
|
||||||
mounth_picker = $('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>' +
|
month_picker = $('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>' +
|
||||||
'<div class="xdsoft_label xdsoft_month"><span></span><i></i></div>' +
|
'<div class="xdsoft_label xdsoft_month"><span></span><i></i></div>' +
|
||||||
'<div class="xdsoft_label xdsoft_year"><span></span><i></i></div>' +
|
'<div class="xdsoft_label xdsoft_year"><span></span><i></i></div>' +
|
||||||
'<button type="button" class="xdsoft_next"></button></div>'),
|
'<button type="button" class="xdsoft_next"></button></div>'),
|
||||||
@ -944,14 +944,14 @@
|
|||||||
datetimepicker.addClass('xdsoft_' + options.theme);
|
datetimepicker.addClass('xdsoft_' + options.theme);
|
||||||
datetimepicker.addClass(options.className);
|
datetimepicker.addClass(options.className);
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_month span')
|
.find('.xdsoft_month span')
|
||||||
.after(monthselect);
|
.after(monthselect);
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_year span')
|
.find('.xdsoft_year span')
|
||||||
.after(yearselect);
|
.after(yearselect);
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_month,.xdsoft_year')
|
.find('.xdsoft_month,.xdsoft_year')
|
||||||
.on('touchstart mousedown.xdsoft', function (event) {
|
.on('touchstart mousedown.xdsoft', function (event) {
|
||||||
var select = $(this).find('.xdsoft_select').eq(0),
|
var select = $(this).find('.xdsoft_select').eq(0),
|
||||||
@ -961,7 +961,7 @@
|
|||||||
items,
|
items,
|
||||||
i;
|
i;
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_select')
|
.find('.xdsoft_select')
|
||||||
.hide();
|
.hide();
|
||||||
if (_xdsoft_datetime.currentTime) {
|
if (_xdsoft_datetime.currentTime) {
|
||||||
@ -982,7 +982,7 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_select')
|
.find('.xdsoft_select')
|
||||||
.xdsoftScroller()
|
.xdsoftScroller()
|
||||||
.on('touchstart mousedown.xdsoft', function (event) {
|
.on('touchstart mousedown.xdsoft', function (event) {
|
||||||
@ -1159,15 +1159,15 @@
|
|||||||
|
|
||||||
applyButton.toggle(options.showApplyButton);
|
applyButton.toggle(options.showApplyButton);
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_today_button')
|
.find('.xdsoft_today_button')
|
||||||
.css('visibility', !options.todayButton ? 'hidden' : 'visible');
|
.css('visibility', !options.todayButton ? 'hidden' : 'visible');
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.' + options.prev)
|
.find('.' + options.prev)
|
||||||
.css('visibility', !options.prevButton ? 'hidden' : 'visible');
|
.css('visibility', !options.prevButton ? 'hidden' : 'visible');
|
||||||
|
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.' + options.next)
|
.find('.' + options.next)
|
||||||
.css('visibility', !options.nextButton ? 'hidden' : 'visible');
|
.css('visibility', !options.nextButton ? 'hidden' : 'visible');
|
||||||
|
|
||||||
@ -1239,7 +1239,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
datepicker
|
datepicker
|
||||||
.append(mounth_picker)
|
.append(month_picker)
|
||||||
.append(calendar)
|
.append(calendar)
|
||||||
.append(applyButton);
|
.append(applyButton);
|
||||||
|
|
||||||
@ -1441,7 +1441,7 @@
|
|||||||
input.val(_xdsoft_datetime.str());
|
input.val(_xdsoft_datetime.str());
|
||||||
datetimepicker.trigger('close.xdsoft');
|
datetimepicker.trigger('close.xdsoft');
|
||||||
});
|
});
|
||||||
mounth_picker
|
month_picker
|
||||||
.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);
|
||||||
@ -1464,7 +1464,7 @@
|
|||||||
input.trigger('change');
|
input.trigger('change');
|
||||||
datetimepicker.trigger('close.xdsoft');
|
datetimepicker.trigger('close.xdsoft');
|
||||||
});
|
});
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_prev,.xdsoft_next')
|
.find('.xdsoft_prev,.xdsoft_next')
|
||||||
.on('touchend mousedown.xdsoft', function () {
|
.on('touchend mousedown.xdsoft', function () {
|
||||||
var $this = $(this),
|
var $this = $(this),
|
||||||
@ -1687,8 +1687,8 @@
|
|||||||
|
|
||||||
calendar.html(table);
|
calendar.html(table);
|
||||||
|
|
||||||
mounth_picker.find('.xdsoft_label span').eq(0).text(options.i18n[globalLocale].months[_xdsoft_datetime.currentTime.getMonth()]);
|
month_picker.find('.xdsoft_label span').eq(0).text(options.i18n[globalLocale].months[_xdsoft_datetime.currentTime.getMonth()]);
|
||||||
mounth_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear());
|
month_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear());
|
||||||
|
|
||||||
// generate timebox
|
// generate timebox
|
||||||
time = '';
|
time = '';
|
||||||
@ -2074,7 +2074,7 @@
|
|||||||
})
|
})
|
||||||
.on('close.xdsoft', function (event) {
|
.on('close.xdsoft', function (event) {
|
||||||
var onClose = true;
|
var onClose = true;
|
||||||
mounth_picker
|
month_picker
|
||||||
.find('.xdsoft_month,.xdsoft_year')
|
.find('.xdsoft_month,.xdsoft_year')
|
||||||
.find('.xdsoft_select')
|
.find('.xdsoft_select')
|
||||||
.hide();
|
.hide();
|
||||||
|
2
jquery.datetimepicker.min.js
vendored
2
jquery.datetimepicker.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user