mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Merge pull request #271 from sjoerdjob/weeks_classname_fix
Use proper class names when options.weeks and options.className are both set.
This commit is contained in:
commit
07b0515b7d
@ -735,7 +735,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
createDateTimePicker = function (input) {
|
createDateTimePicker = function (input) {
|
||||||
var datetimepicker = $('<div ' + (options.id ? 'id="' + options.id + '"' : '') + ' ' + (options.style ? 'style="' + options.style + '"' : '') + ' class="xdsoft_datetimepicker xdsoft_' + options.theme + ' xdsoft_noselect ' + (options.weeks ? ' xdsoft_showweeks' : '') + options.className + '"></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>' +
|
mounth_picker = $('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>' +
|
||||||
@ -762,6 +762,13 @@
|
|||||||
timer1 = 0,
|
timer1 = 0,
|
||||||
_xdsoft_datetime;
|
_xdsoft_datetime;
|
||||||
|
|
||||||
|
if (options.id) datetimepicker.attr('id', options.id);
|
||||||
|
if (options.style) datetimepicker.attr('style', options.style);
|
||||||
|
if (options.weeks) datetimepicker.addClass('xdsoft_showweeks');
|
||||||
|
|
||||||
|
datetimepicker.addClass('xdsoft_' + options.theme);
|
||||||
|
datetimepicker.addClass(options.className);
|
||||||
|
|
||||||
mounth_picker
|
mounth_picker
|
||||||
.find('.xdsoft_month span')
|
.find('.xdsoft_month span')
|
||||||
.after(monthselect);
|
.after(monthselect);
|
||||||
|
Loading…
Reference in New Issue
Block a user