From 7c645e58d03cdb9fb51b2675fc736bed83de1d08 Mon Sep 17 00:00:00 2001 From: Bob Mazanec Date: Wed, 24 Dec 2014 11:17:11 -0600 Subject: [PATCH] Create several datetimepickers with class selector Fixes Issue #201 by moving _xdsoft_datetime declaration from $.fn.datetimepicker() down into its createDateTimePicker() With this fix, the next/prev month arrows work in all datetimepickers, and not just the last. --- index.html | 5 +++++ jquery.datetimepicker.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 9e5bc62..1e925d5 100644 --- a/index.html +++ b/index.html @@ -16,6 +16,9 @@

Homepage

DateTimePicker



+

DateTimePickers selected by class

+ +

Mask DateTimePicker



TimePicker

@@ -69,6 +72,8 @@ startDate: '1986/01/05' }); $('#datetimepicker').datetimepicker({value:'2015/04/15 05:03',step:10}); +$('.some_class').datetimepicker(); + $('#default_datetimepicker').datetimepicker({ formatTime:'H:i', formatDate:'d.m.Y', diff --git a/jquery.datetimepicker.js b/jquery.datetimepicker.js index cc84b63..3ccdbef 100644 --- a/jquery.datetimepicker.js +++ b/jquery.datetimepicker.js @@ -690,7 +690,6 @@ lazyInitTimer = 0, createDateTimePicker, destroyDateTimePicker, - _xdsoft_datetime, lazyInit = function (input) { input @@ -735,7 +734,8 @@ current_time_index, setPos, timer = 0, - timer1 = 0; + timer1 = 0, + _xdsoft_datetime; mounth_picker .find('.xdsoft_month span')