From 3262fbdcb555cf4a5510747a067ddb22435dbd77 Mon Sep 17 00:00:00 2001 From: Sjoerd Job Postmus Date: Thu, 7 May 2015 22:17:21 +0200 Subject: [PATCH] Use proper class names when options.weeks and options.className are both set. When options.weeks is true, and options.className is set, the result is that both are concatenated together without a space to separate them. For future maintainability, I decided to split out the modifications to the datetimepicker element into separate modifications to more cleanly show intent. --- jquery.datetimepicker.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jquery.datetimepicker.js b/jquery.datetimepicker.js index 22b961c..0e8c840 100644 --- a/jquery.datetimepicker.js +++ b/jquery.datetimepicker.js @@ -735,7 +735,7 @@ }; createDateTimePicker = function (input) { - var datetimepicker = $('
'), + var datetimepicker = $('
'), xdsoft_copyright = $(''), datepicker = $('
'), mounth_picker = $('
' + @@ -762,6 +762,13 @@ timer1 = 0, _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 .find('.xdsoft_month span') .after(monthselect);