From 5c32c7591d6c07824cb5b87dbfbe2982e2e88427 Mon Sep 17 00:00:00 2001 From: BeenaShetty Date: Wed, 13 Jun 2012 13:25:43 +0530 Subject: [PATCH 01/11] Removed the value setting to drop-down list of time because of it was not showing selected value. --- jquery.ui.datetimepicker.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/jquery.ui.datetimepicker.js b/jquery.ui.datetimepicker.js index aeb399f..7a14374 100644 --- a/jquery.ui.datetimepicker.js +++ b/jquery.ui.datetimepicker.js @@ -833,15 +833,9 @@ $.extend($.ui, { datetimepicker: { version: "1.0.0"} }); inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') + 'Class']('ui-datepicker-rtl'); - $("#DP_jQuery_Hour_" + dpuuid).val(inst.selectedHour); - $("#DP_jQuery_Minute_" + dpuuid).val(inst.selectedMinute); - $("#DP_jQuery_AMPM_" + dpuuid).val(inst.selectedAMPM); - if (inst == $.datetimepicker._curInst && $.datetimepicker._datepickerShowing && inst.input && inst.input.is(':visible') && !inst.input.is(':disabled')) inst.input.focus(); - - }, /* Retrieve the size of left and top borders for an element. From 497e7d2ddf9dfe2e389a487450b8c164978ee4cb Mon Sep 17 00:00:00 2001 From: BeenaShetty Date: Wed, 13 Jun 2012 14:44:05 +0530 Subject: [PATCH 02/11] Updated readme --- README | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README b/README index d122aab..af173f7 100644 --- a/README +++ b/README @@ -1,4 +1,18 @@ This is the jQuery dateTimePicker plugin from http://www.projectcodegen.com/JQueryDateTimePicker.aspxk -This repo contains a bug fix for a +100 year problem +This repo contains a bug fix for a +100 year problem. + +How to use datetimepicker in code. +1. Add this jquery.ui.datetimepicker.js file in your project +2. Add datepicker.css file in your stylesheet + + + + + +This will call datetimepicker onclick of input field. From c590ce643c217d767f4a58f3880ddb6e342e4487 Mon Sep 17 00:00:00 2001 From: BeenaShetty Date: Wed, 13 Jun 2012 14:53:03 +0530 Subject: [PATCH 03/11] Update Readme with example --- README | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/README b/README index af173f7..7934b1f 100644 --- a/README +++ b/README @@ -7,12 +7,51 @@ How to use datetimepicker in code. 1. Add this jquery.ui.datetimepicker.js file in your project 2. Add datepicker.css file in your stylesheet +1. Example1 + +m This will call datetimepicker onclick of input field. + +2.Example2 + By default select specified date + + + + +3.Example3 + By default select specified time +$('#date_time').datetimepicker({ + hour : 8, + minute : 30, + ampm : 'PM' +}); + +4. Example 4 + Disable previous dates. + + var date = new Date(); + var m = date.getMonth(); + var d = date.getDate(); + var y = date.getFullYear(); + $('#date_time').datetimepicker({ + minDate : new Date(y, m, d) + }); + + + + + + From 3bd11b5d16ca328dcb2837e63c084a98f6f2e0fa Mon Sep 17 00:00:00 2001 From: BeenaShetty Date: Wed, 13 Jun 2012 14:54:30 +0530 Subject: [PATCH 04/11] Update master --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 7934b1f..69babc5 100644 --- a/README +++ b/README @@ -15,7 +15,7 @@ How to use datetimepicker in code. $(document).ready(function(){ $('#date_time').datetimepicker({}); }); -m + This will call datetimepicker onclick of input field. From 9eb7a05593b2da6938f009dd7cffa832be723497 Mon Sep 17 00:00:00 2001 From: BeenaShetty Date: Wed, 13 Jun 2012 14:58:34 +0530 Subject: [PATCH 05/11] added selecting hour and minute as specified --- jquery.ui.datetimepicker.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jquery.ui.datetimepicker.js b/jquery.ui.datetimepicker.js index 7a14374..5307c81 100644 --- a/jquery.ui.datetimepicker.js +++ b/jquery.ui.datetimepicker.js @@ -205,7 +205,10 @@ $.extend($.ui, { datetimepicker: { version: "1.0.0"} }); altFormat: '', // The date format to use for the alternate field constrainInput: false, // The input is constrained by the current date format showButtonPanel: false, // True to show button panel, false to not show it - autoSize: false // True to size the input for the date format, false to leave as is + autoSize: false, // True to size the input for the date format, false to leave as is + hour: null, + minute: null, + ampm: null }; $.extend(this._defaults, this.regional['']); this.dpDiv = $('
'); @@ -1490,6 +1493,7 @@ $.extend($.ui, { datetimepicker: { version: "1.0.0"} }); html += group; // Hour Drop Down + inst.currentHour = (hour== null ? inst.currentHour : hour); html += 'Time '; //AM/PM drop Down + inst.currentAMPM = (ampm== null ? inst.currentAMPM : ampm); html += ' '; - for (i = 1; i < 13; i++) { - html += '