From 0e26d5d4b4b6303136163cd9e803d22ff5f8c288 Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Mon, 21 Nov 2016 14:02:02 +0530 Subject: [PATCH 01/29] Bug Fix for setting hour and minutes as 0 --- angularjs-datetime-picker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angularjs-datetime-picker.js b/angularjs-datetime-picker.js index e86247d..817be63 100644 --- a/angularjs-datetime-picker.js +++ b/angularjs-datetime-picker.js @@ -231,8 +231,8 @@ var year = scope.year || today.getFullYear(); var month = scope.month ? (scope.month-1) : today.getMonth(); var day = scope.day || today.getDate(); - var hour = scope.hour || today.getHours(); - var minute = scope.minute || today.getMinutes(); + var hour = scope.hour || scope.hour === 0 ? scope.hour : today.getHours(); + var minute = scope.minute || scope.minute === 0 ? scope.minute : today.getMinutes(); scope.selectedDate = new Date(year, month, day, hour, minute, 0); } scope.inputHour = scope.selectedDate.getHours(); From d1038182849afbabb091df5cb6df5548ccbfecb4 Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Mon, 21 Nov 2016 15:27:58 +0530 Subject: [PATCH 02/29] Date resets while setting time https://github.com/kineticsocial/angularjs-datetime-picker/issues/33 --- angularjs-datetime-picker.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/angularjs-datetime-picker.js b/angularjs-datetime-picker.js index 817be63..a6780f6 100644 --- a/angularjs-datetime-picker.js +++ b/angularjs-datetime-picker.js @@ -128,8 +128,8 @@ ' ', '
', ' {{("0"+inputHour).slice(-2)}} : {{("0"+inputMinute).slice(-2)}}
', - ' ', - ' ', + ' ', + ' ', '
', ''].join("\n"); @@ -239,6 +239,9 @@ scope.inputMinute = scope.selectedDate.getMinutes(); // Default to current year and month + var elScope = ctrl.triggerEl.scope(); + var preSelectedDate = dateFilter(elScope.$eval(attrs.ngModel), dateFormat); + scope.selectedDate = preSelectedDate ? new Date(preSelectedDate) : scope.selectedDate; scope.mv = getMonthView(scope.selectedDate.getFullYear(), scope.selectedDate.getMonth()); scope.today = dateFilter(new Date(), 'yyyy-M-d'); if (scope.mv.year == scope.selectedDate.getFullYear() && scope.mv.month == scope.selectedDate.getMonth()) { From ffef86128d84dc113b9a7789fc07ce91894ad8c8 Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Mon, 21 Nov 2016 22:53:54 +0530 Subject: [PATCH 03/29] Fixing future-only date selection feature https://github.com/kineticsocial/angularjs-datetime-picker/issues/14 --- README.md | 6 +++--- angularjs-datetime-picker.js | 16 +++++++++++++--- index.html | 9 ++++++--- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 44c799b..1575c9b 100644 --- a/README.md +++ b/README.md @@ -32,16 +32,16 @@ Attributes - date-format: optional, date format e.g. 'yyyy-MM-dd' - year: optional, year selected, e.g. 2015 - month: optional, month selected, e.g. 5 - - day: optiona, day selected, e.g. 31 + - day: optional, day selected, e.g. 31 - hour: optional, hour selected, 23 - minute: optional, minute selected, 59 - date-only: optional, if set, timepicker will be hidden - - future-only: optional, if set, forces validation errors on dates earlier than now + - future-only: optional, if set, Date which is older than today's Date will be not be selectable (Past time for same date is not handled) Examples -------- - + diff --git a/angularjs-datetime-picker.js b/angularjs-datetime-picker.js index a6780f6..88e6fb6 100644 --- a/angularjs-datetime-picker.js +++ b/angularjs-datetime-picker.js @@ -51,6 +51,9 @@ if (options.dateOnly === '' || options.dateOnly === true) { div.attr('date-only', 'true'); } + if (options.futureOnly === '' || options.futureOnly === true) { + div.attr('future-only', 'true'); + } if (options.closeOnSelect === 'false') { div.attr('close-on-select', 'false'); } @@ -115,9 +118,10 @@ '
', '
{{::dayOfWeek.firstLetter}}
', '
{{::day}}
', - '

Datetime Picker

- <input ng-model="date4" datetime-picker date-only />
-

+ <input ng-model="date0" datetime-picker date-only />
+

+ + <input ng-model="date1" datetime-picker date-only future-only />
+

<input ng-model="date2" datetime-picker date-format="yyyy-MM-dd" date-only />



From 94ee01bf8d0de42917c7d614da81b88c7b5b6b53 Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Mon, 21 Nov 2016 23:21:38 +0530 Subject: [PATCH 04/29] updating readme file with updated index file --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1575c9b..55528fd 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ Simple DateTime Picker For AngularJS No JQuery, No Bootstrap, Just AngularJS (ver. 1.3+) -[DEMO](https://rawgit.com/kineticsocial/angularjs-datetime-picker/master/index.html) -[![Imgur](http://i.imgur.com/UJfYMN6.png?1)](https://rawgit.com/kineticsocial/angularjs-datetime-picker/master/index.html) +[DEMO](https://rawgit.com/mani-s17/angularjs-datetime-picker/master/index.html) +[![Imgur](http://i.imgur.com/UJfYMN6.png?1)](https://rawgit.com/mani-s17/angularjs-datetime-picker/master/index.html) To Get Started -------------- From 151914d96dc8fbd6053e07116de37a4eae1a43eb Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Wed, 23 Nov 2016 03:20:54 +0530 Subject: [PATCH 05/29] Implementing Date Range selection feature --- README.md | 1 + angularjs-datetime-picker.js | 29 +++++++++++++++++++++++------ index.html | 3 +++ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 55528fd..6c53603 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ Attributes - minute: optional, minute selected, 59 - date-only: optional, if set, timepicker will be hidden - future-only: optional, if set, Date which is older than today's Date will be not be selectable (Past time for same date is not handled) + - start-date & end-date: optional, if set, date which is in between the range will only be selectable. future-only tag has more precedence than date range feature, date range feature will not work if future-only tag is enabled Examples -------- diff --git a/angularjs-datetime-picker.js b/angularjs-datetime-picker.js index 88e6fb6..e6c5180 100644 --- a/angularjs-datetime-picker.js +++ b/angularjs-datetime-picker.js @@ -53,6 +53,9 @@ } if (options.futureOnly === '' || options.futureOnly === true) { div.attr('future-only', 'true'); + } else { + options.startDate && div.attr('start-date', options.startDate); + options.endDate && div.attr('end-date', options.endDate); } if (options.closeOnSelect === 'false') { div.attr('close-on-select', 'false'); @@ -121,7 +124,7 @@ '



+ <input ng-model="date6" datetime-picker date-only start-date="11-20-2016" end-date="02-25-2017" />
+

+ <input ng-model="date2" datetime-picker date-format="yyyy-MM-dd" date-only />



From c314439cb5790c56cdfa513832d7096043575c6c Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Wed, 23 Nov 2016 15:12:12 +0530 Subject: [PATCH 06/29] Handling start date & end date individually for better options --- README.md | 12 +++++++++++- angularjs-datetime-picker.js | 8 ++++++++ index.html | 8 +++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6c53603..4d7ca82 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,11 @@ Attributes - minute: optional, minute selected, 59 - date-only: optional, if set, timepicker will be hidden - future-only: optional, if set, Date which is older than today's Date will be not be selectable (Past time for same date is not handled) - - start-date & end-date: optional, if set, date which is in between the range will only be selectable. future-only tag has more precedence than date range feature, date range feature will not work if future-only tag is enabled + - start-date optional, if set, date which is on or after start-date will be selectable + - end-date optional, if set, date which is on or before end-date will be selectable + - start-date & end-date: optional, if set, date which is in between the range will only be selectable + Note: + future-only tag has more precedence than start-date & end-date tags Examples -------- @@ -46,6 +50,12 @@ Examples + + + + + + diff --git a/angularjs-datetime-picker.js b/angularjs-datetime-picker.js index e6c5180..1be0abc 100644 --- a/angularjs-datetime-picker.js +++ b/angularjs-datetime-picker.js @@ -270,6 +270,14 @@ startDate.setHours(0,0,0,0); endDate.setHours(0,0,0,0); return startDate <= someday && someday <= endDate; + } else if (!isNaN(Date.parse(attrs.startDate)) && isNaN(Date.parse(attrs.endDate))) { + var startDate = new Date(attrs.startDate); + startDate.setHours(0,0,0,0); + return startDate <= someday; + } else if (isNaN(Date.parse(attrs.startDate)) && !isNaN(Date.parse(attrs.endDate))) { + var endDate = new Date(attrs.endDate); + endDate.setHours(0,0,0,0); + return someday <= endDate; } else { return true; } diff --git a/index.html b/index.html index cfb13f3..6fa84dc 100644 --- a/index.html +++ b/index.html @@ -24,9 +24,15 @@

Datetime Picker

<input ng-model="date1" datetime-picker date-only future-only />


- <input ng-model="date6" datetime-picker date-only start-date="11-20-2016" end-date="02-25-2017" />
+ <input ng-model="date6" datetime-picker date-only start-date="11-20-2016" end-date="22-25-2017" />


+ <input ng-model="date7" datetime-picker date-only start-date="11-20-2016" />
+

+ + <input ng-model="date8" datetime-picker date-only end-date="02-25-2017" />
+

+ <input ng-model="date2" datetime-picker date-format="yyyy-MM-dd" date-only />



From 64789425fe2f5a58bd612f8d3f209a34a6fea31e Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Wed, 23 Nov 2016 15:22:20 +0530 Subject: [PATCH 07/29] Bug fix: Pre selected time resets to default time --- angularjs-datetime-picker.js | 4 ++-- index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/angularjs-datetime-picker.js b/angularjs-datetime-picker.js index 1be0abc..d2e7cf8 100644 --- a/angularjs-datetime-picker.js +++ b/angularjs-datetime-picker.js @@ -242,13 +242,13 @@ var minute = scope.minute || scope.minute === 0 ? scope.minute : today.getMinutes(); scope.selectedDate = new Date(year, month, day, hour, minute, 0); } - scope.inputHour = scope.selectedDate.getHours(); - scope.inputMinute = scope.selectedDate.getMinutes(); // Default to current year and month var elScope = ctrl.triggerEl.scope(); var preSelectedDate = dateFilter(elScope.$eval(attrs.ngModel), dateFormat); scope.selectedDate = preSelectedDate ? new Date(preSelectedDate) : scope.selectedDate; + scope.inputHour = preSelectedDate ? new Date(preSelectedDate).getHours() : scope.selectedDate.getHours(); + scope.inputMinute = preSelectedDate ? new Date(preSelectedDate).getMinutes() : scope.selectedDate.getMinutes(); scope.mv = getMonthView(scope.selectedDate.getFullYear(), scope.selectedDate.getMonth()); scope.today = dateFilter(today, 'yyyy-M-d'); if (scope.mv.year == scope.selectedDate.getFullYear() && scope.mv.month == scope.selectedDate.getMonth()) { diff --git a/index.html b/index.html index 6fa84dc..16c4954 100644 --- a/index.html +++ b/index.html @@ -28,10 +28,10 @@

Datetime Picker



<input ng-model="date7" datetime-picker date-only start-date="11-20-2016" />
-

+

<input ng-model="date8" datetime-picker date-only end-date="02-25-2017" />
-

+

<input ng-model="date2" datetime-picker date-format="yyyy-MM-dd" date-only />



From ffc2813bdcd3bf2fe2a7283e7da72a915ef9dce2 Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Wed, 23 Nov 2016 16:14:12 +0530 Subject: [PATCH 08/29] Updating documentation for v0.2.0 --- README.md | 9 ++++++--- bower.json | 8 ++++---- package.json | 10 +++++----- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 4d7ca82..e58df0a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -Simple DateTime Picker For AngularJS -=================================== +Simple Date / DateTime Picker For AngularJS +=========================================== -No JQuery, No Bootstrap, Just AngularJS (ver. 1.3+) +No JQuery, No Bootstrap, Just AngularJS (ver. 1.4+) [DEMO](https://rawgit.com/mani-s17/angularjs-datetime-picker/master/index.html) [![Imgur](http://i.imgur.com/UJfYMN6.png?1)](https://rawgit.com/mani-s17/angularjs-datetime-picker/master/index.html) @@ -64,3 +64,6 @@ Examples + +This project has been forked from [KineticSocial-angularjs-datetime-picker](https://github.com/kineticsocial/angularjs-datetime-picker) an inactive project. +We are actively working on this project to enhance & fix issues. diff --git a/bower.json b/bower.json index 6702b38..2373103 100644 --- a/bower.json +++ b/bower.json @@ -1,12 +1,12 @@ { "name": "angularjs-datetime-picker", "main": "angularjs-datetime-picker.js", - "version": "0.1.20", - "homepage": "https://github.com/kineticsocial/angularjs-datetime-picker", + "version": "0.2.0", + "homepage": "https://github.com/mani-s17/angularjs-datetime-picker", "authors": [ - "Allen Kim " + "Subramaniam Srinivasan " ], - "description": "Datepicker/Datetime picker for your INPUT tag", + "description": "AngularJs Date / Datetime picker for your INPUT tag. This project is forked from https://github.com/kineticsocial/angularjs-datetime-picker an inactive project.", "keywords": [ "Angular", "Javascript", diff --git a/package.json b/package.json index 64fac8b..7cce3fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angularjs-datetime-picker", - "version": "0.1.20", + "version": "0.2.0", "description": "Very Lightweight AngularJS DateTime Picker Without Using jQuery, bootStrap, or moment", "main": "angularjs-datetime-picker.js", "scripts": { @@ -8,7 +8,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/kineticsocial/angularjs-datetime-picker.git" + "url": "https://github.com/mani-s17/angularjs-datetime-picker.git" }, "keywords": [ "angularjs", @@ -16,10 +16,10 @@ "date", "datetime" ], - "author": "Allen Kim ", + "author": "Subramaniam Srinivasan ", "license": "MIT", "bugs": { - "url": "https://github.com/kineticsocial/angularjs-datetime-picker/issues" + "url": "https://github.com/mani-s17/angularjs-datetime-picker/issues" }, "devDependencies": { "gulp": "^3.8.11", @@ -30,5 +30,5 @@ "gulp-uglify": "^1.2.0", "run-sequence": "^1.1.0" } - "homepage": "https://github.com/kineticsocial/angularjs-datetime-picker" + "homepage": "https://github.com/mani-s17/angularjs-datetime-picker" } From 95d0ecfa1c3b74d53c67217f50ea6241ffbff252 Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Wed, 23 Nov 2016 16:19:09 +0530 Subject: [PATCH 09/29] fixing package.json typo --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7cce3fb..41b59b5 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,6 @@ "gulp-strip-debug": "^1.0.2", "gulp-uglify": "^1.2.0", "run-sequence": "^1.1.0" - } + }, "homepage": "https://github.com/mani-s17/angularjs-datetime-picker" } From e609879641382d84fe0b4dc4f67c9b5a462ef63e Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Wed, 23 Nov 2016 16:23:26 +0530 Subject: [PATCH 10/29] Example layout fix --- index.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 16c4954..472ef1b 100644 --- a/index.html +++ b/index.html @@ -44,12 +44,10 @@

Datetime Picker

gmtDate : {{gmtDate}}
<input type="date" ng-model="gmtDate" size="30" />
- +

-
- <input ng-model="date5" datetime-picker date-format="yyyy-MM-dd HH:mm:ss" year="2014" month="12" day="31" hour="23" minute="59" />
-

-
+ <input ng-model="date5" datetime-picker date-format="yyyy-MM-dd HH:mm:ss" year="2014" month="12" day="31" hour="23" minute="59" />
+

From 2bd0f202e7b4f2bd9a22fc217b59ade4274dc5b4 Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Wed, 23 Nov 2016 16:23:42 +0530 Subject: [PATCH 11/29] Updating minified js --- angularjs-datetime-picker.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs-datetime-picker.min.js b/angularjs-datetime-picker.min.js index fe3a6bc..8756abd 100644 --- a/angularjs-datetime-picker.min.js +++ b/angularjs-datetime-picker.min.js @@ -1 +1 @@ -!function(){"use strict";angular.module("angularjs-datetime-picker",[]);var e=function(e){"string"==typeof e&&(e=new Date(e));var t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1),n=Math.max(t.getTimezoneOffset(),a.getTimezoneOffset()),l=e.getTimezoneOffset()=0?"-":"+";return r+("0"+i/60).slice(-2)+":"+("0"+i%60).slice(-2)},t=function(e,t,a){var n=a("DatetimePickerCtrl");return{open:function(e){n.openDatetimePicker(e)},close:function(){n.closeDatetimePicker()}}};t.$inject=["$compile","$document","$controller"],angular.module("angularjs-datetime-picker").factory("DatetimePicker",t);var a=function(e,t){var a,n=this,l=function(e){e&&e.remove(),t[0].body.removeEventListener("click",n.closeDatetimePicker)};this.openDatetimePicker=function(n){this.closeDatetimePicker();var l=angular.element("
");n.dateFormat&&l.attr("date-format",n.dateFormat),n.ngModel&&l.attr("ng-model",n.ngModel),n.year&&l.attr("year",parseInt(n.year)),n.month&&l.attr("month",parseInt(n.month)),n.day&&l.attr("day",parseInt(n.day)),n.hour&&l.attr("hour",parseInt(n.hour)),n.minute&&l.attr("minute",parseInt(n.minute)),(""===n.dateOnly||n.dateOnly===!0)&&l.attr("date-only","true"),"false"===n.closeOnSelect&&l.attr("close-on-select","false");var i=n.triggerEl;n.scope=n.scope||angular.element(i).scope(),a=e(l)(n.scope)[0],a.triggerEl=n.triggerEl,t[0].body.appendChild(a);var r=i.getBoundingClientRect();n.scope.$apply();var o=a.getBoundingClientRect();a.style.position="absolute",a.style.left=r.width>o.width?r.left+r.width-o.width+window.scrollX+"px":r.left+window.scrollX+"px",a.style.top=r.top<300||window.innerHeight-r.bottom>300?r.bottom+window.scrollY+"px":r.top-o.height+window.scrollY+"px",t[0].body.addEventListener("click",this.closeDatetimePicker)},this.closeDatetimePicker=function(e){var a=e&&e.target,n=t[0].querySelector("div[datetime-picker-popup]");e&&a?a.hasAttribute("datetime-picker")||n&&n.contains(a)||l(n):l(n)}};a.$inject=["$compile","$document"],angular.module("angularjs-datetime-picker").controller("DatetimePickerCtrl",a);var n=['
','
',' ',' {{months[mv.month].shortName}} {{mv.year}}',' ',"
",'
','
{{::dayOfWeek.firstLetter}}
','
{{::day}}
','
'," {{::day}}","
",'
{{::day}}
',"
",'
',' {{("0"+inputHour).slice(-2)}} : {{("0"+inputMinute).slice(-2)}}
',' ',' ',"
","
"].join("\n"),l=function(t,a){var l,i,r,o,d=function(){l=[],i=[],r=[],o=0;for(var e=1;31>=e;e++)l.push(e);for(var e=0;12>e;e++)i.push({fullName:t.DATETIME_FORMATS.MONTH[e],shortName:t.DATETIME_FORMATS.SHORTMONTH[e]});for(var e=0;7>e;e++){var a=t.DATETIME_FORMATS.DAY[(e+o)%7];r.push({fullName:a,firstLetter:a.substr(0,1)})}o=0},s=function(e,t){t>11?e++:0>t&&e--,t=(t+12)%12;var a=new Date(e,t,1),n=new Date(e,t+1,0),i=new Date(e,t,0),r=n.getDate(),d=i.getDate(),s=a.getDay(),c=(s-o+7)%7||7,u=l.slice(0,42-(c+r));return u.length>7&&(u=u.slice(0,u.length-7)),{year:e,month:t,days:l.slice(0,r),leadingDays:l.slice(-c-(31-d),d),trailingDays:u}},c=function(t,n,l,o){d();var c=l.dateFormat||"short";t.months=i,t.daysOfWeek=r,t.inputHour,t.inputMinute,t.dateOnly===!0&&(n[0].querySelector("#adp-time").style.display="none"),t.$applyAsync(function(){if(o.triggerEl=angular.element(n[0].triggerEl),l.ngModel){var i=""+o.triggerEl.scope().$eval(l.ngModel);if(i){i.match(/[0-9]{2}:/)||(i+=" 00:00:00"),i=i.replace(/([0-9]{2}-[0-9]{2})-([0-9]{4})/,"$2-$1"),i=i.replace(/([\/-][0-9]{2,4})\ ([0-9]{2}\:[0-9]{2}\:)/,"$1T$2"),i=i.replace(/EDT|EST|CDT|CST|MDT|PDT|PST|UT|GMT/g,""),i=i.replace(/\s*\(\)\s*/,""),i=i.replace(/[\-\+][0-9]{2}:?[0-9]{2}$/,""),i+=e(i);var r=new Date(i);t.selectedDate=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds())}}if(!t.selectedDate||isNaN(t.selectedDate.getTime())){var d=new Date,c=t.year||d.getFullYear(),u=t.month?t.month-1:d.getMonth(),m=t.day||d.getDate(),g=t.hour||d.getHours(),p=t.minute||d.getMinutes();t.selectedDate=new Date(c,u,m,g,p,0)}t.inputHour=t.selectedDate.getHours(),t.inputMinute=t.selectedDate.getMinutes(),t.mv=s(t.selectedDate.getFullYear(),t.selectedDate.getMonth()),t.today=a(new Date,"yyyy-M-d"),t.selectedDay=t.mv.year==t.selectedDate.getFullYear()&&t.mv.month==t.selectedDate.getMonth()?t.selectedDate.getDate():null}),t.addMonth=function(e){t.mv=s(t.mv.year,t.mv.month+e)},t.setDate=function(e){var a=angular.element(e.target)[0];-1!==a.className.indexOf("selectable")&&(t.updateNgModel(parseInt(a.innerHTML)),t.closeOnSelect!==!1&&o.closeDatetimePicker())},t.updateNgModel=function(e){if(e=e?e:t.selectedDate.getDate(),t.selectedDate=new Date(t.mv.year,t.mv.month,e,t.inputHour,t.inputMinute,0),t.selectedDay=t.selectedDate.getDate(),l.ngModel){var n,i=o.triggerEl.scope();n=i.$eval(l.ngModel)&&"Date"===i.$eval(l.ngModel).constructor.name?new Date(a(t.selectedDate,c)):a(t.selectedDate,c),i.$eval(l.ngModel+"= date",{date:n})}},t.$on("$destroy",o.closeDatetimePicker)};return{restrict:"A",template:n,controller:"DatetimePickerCtrl",replace:!0,scope:{year:"=",month:"=",day:"=",hour:"=",minute:"=",dateOnly:"=",closeOnSelect:"="},link:c}};l.$inject=["$locale","dateFilter"],angular.module("angularjs-datetime-picker").directive("datetimePickerPopup",l);var i=function(e,t){return{require:"ngModel",link:function(e,a,n,l){e.$watch(n.ngModel,function(e){if(e&&""!=e){var t=new Date(e);l.$setValidity("date",t?!0:!1);var a=new Date;n.hasOwnProperty("futureOnly")&&l.$setValidity("future-only",a>t?!1:!0)}}),a[0].addEventListener("click",function(){t.open({triggerEl:a[0],dateFormat:n.dateFormat,ngModel:n.ngModel,year:n.year,month:n.month,day:n.day,hour:n.hour,minute:n.minute,dateOnly:n.dateOnly,futureOnly:n.futureOnly,closeOnSelect:n.closeOnSelect})})}}};i.$inject=["$parse","DatetimePicker"],angular.module("angularjs-datetime-picker").directive("datetimePicker",i)}(); \ No newline at end of file +!function(){"use strict";angular.module("angularjs-datetime-picker",[]);var e=function(e){"string"==typeof e&&(e=new Date(e));var t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1),n=Math.max(t.getTimezoneOffset(),a.getTimezoneOffset()),r=e.getTimezoneOffset()=0?"-":"+";return i+("0"+l/60).slice(-2)+":"+("0"+l%60).slice(-2)},t=function(e,t,a){var n=a("DatetimePickerCtrl");return{open:function(e){n.openDatetimePicker(e)},close:function(){n.closeDatetimePicker()}}};t.$inject=["$compile","$document","$controller"],angular.module("angularjs-datetime-picker").factory("DatetimePicker",t);var a=function(e,t){var a,n=this,r=function(e){e&&e.remove(),t[0].body.removeEventListener("click",n.closeDatetimePicker)};this.openDatetimePicker=function(n){this.closeDatetimePicker();var r=angular.element("
");n.dateFormat&&r.attr("date-format",n.dateFormat),n.ngModel&&r.attr("ng-model",n.ngModel),n.year&&r.attr("year",parseInt(n.year)),n.month&&r.attr("month",parseInt(n.month)),n.day&&r.attr("day",parseInt(n.day)),n.hour&&r.attr("hour",parseInt(n.hour)),n.minute&&r.attr("minute",parseInt(n.minute)),""!==n.dateOnly&&n.dateOnly!==!0||r.attr("date-only","true"),""===n.futureOnly||n.futureOnly===!0?r.attr("future-only","true"):(n.startDate&&r.attr("start-date",n.startDate),n.endDate&&r.attr("end-date",n.endDate)),"false"===n.closeOnSelect&&r.attr("close-on-select","false");var l=n.triggerEl;n.scope=n.scope||angular.element(l).scope(),a=e(r)(n.scope)[0],a.triggerEl=n.triggerEl,t[0].body.appendChild(a);var i=l.getBoundingClientRect();n.scope.$apply();var s=a.getBoundingClientRect();a.style.position="absolute",i.width>s.width?a.style.left=i.left+i.width-s.width+window.scrollX+"px":a.style.left=i.left+window.scrollX+"px",i.top<300||window.innerHeight-i.bottom>300?a.style.top=i.bottom+window.scrollY+"px":a.style.top=i.top-s.height+window.scrollY+"px",t[0].body.addEventListener("click",this.closeDatetimePicker)},this.closeDatetimePicker=function(e){var a=e&&e.target,n=t[0].querySelector("div[datetime-picker-popup]");e&&a?a.hasAttribute("datetime-picker")||n&&n.contains(a)||r(n):r(n)}};a.$inject=["$compile","$document"],angular.module("angularjs-datetime-picker").controller("DatetimePickerCtrl",a);var n=['
','
',' ',' {{months[mv.month].shortName}} {{mv.year}}',' ',"
",'
','
{{::dayOfWeek.firstLetter}}
','
{{::day}}
','
'," {{::day}}","
",'
{{::day}}
',"
",'
',' {{("0"+inputHour).slice(-2)}} : {{("0"+inputMinute).slice(-2)}}
',' ',' ',"
","
"].join("\n"),r=function(t,a){var r,l,i,s,o=function(){r=[],l=[],i=[],s=0;for(var e=1;e<=31;e++)r.push(e);for(var e=0;e<12;e++)l.push({fullName:t.DATETIME_FORMATS.MONTH[e],shortName:t.DATETIME_FORMATS.SHORTMONTH[e]});for(var e=0;e<7;e++){var a=t.DATETIME_FORMATS.DAY[(e+s)%7];i.push({fullName:a,firstLetter:a.substr(0,1)})}s=0},d=function(e,t){t>11?e++:t<0&&e--,t=(t+12)%12;var a=new Date(e,t,1),n=new Date(e,t+1,0),l=new Date(e,t,0),i=n.getDate(),o=l.getDate(),d=a.getDay(),c=(d-s+7)%7||7,u=r.slice(0,42-(c+i));return u.length>7&&(u=u.slice(0,u.length-7)),{year:e,month:t,days:r.slice(0,i),leadingDays:r.slice(-c-(31-o),o),trailingDays:u}},c=function(t,n,r,s){o();var c=r.dateFormat||"short";t.months=l,t.daysOfWeek=i,t.inputHour,t.inputMinute,t.dateOnly===!0&&(n[0].querySelector("#adp-time").style.display="none"),t.$applyAsync(function(){if(s.triggerEl=angular.element(n[0].triggerEl),r.ngModel){var l=""+s.triggerEl.scope().$eval(r.ngModel);if(l){l.match(/[0-9]{2}:/)||(l+=" 00:00:00"),l=l.replace(/([0-9]{2}-[0-9]{2})-([0-9]{4})/,"$2-$1"),l=l.replace(/([\/-][0-9]{2,4})\ ([0-9]{2}\:[0-9]{2}\:)/,"$1T$2"),l=l.replace(/EDT|EST|CDT|CST|MDT|PDT|PST|UT|GMT/g,""),l=l.replace(/\s*\(\)\s*/,""),l=l.replace(/[\-\+][0-9]{2}:?[0-9]{2}$/,""),l+=e(l);var i=new Date(l);t.selectedDate=new Date(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds())}}var o=new Date;if(!t.selectedDate||isNaN(t.selectedDate.getTime())){var u=t.year||o.getFullYear(),m=t.month?t.month-1:o.getMonth(),g=t.day||o.getDate(),p=t.hour||0===t.hour?t.hour:o.getHours(),D=t.minute||0===t.minute?t.minute:o.getMinutes();t.selectedDate=new Date(u,m,g,p,D,0)}var y=s.triggerEl.scope(),v=a(y.$eval(r.ngModel),c);t.selectedDate=v?new Date(v):t.selectedDate,t.inputHour=v?new Date(v).getHours():t.selectedDate.getHours(),t.inputMinute=v?new Date(v).getMinutes():t.selectedDate.getMinutes(),t.mv=d(t.selectedDate.getFullYear(),t.selectedDate.getMonth()),t.today=a(o,"yyyy-M-d"),t.mv.year==t.selectedDate.getFullYear()&&t.mv.month==t.selectedDate.getMonth()?t.selectedDay=t.selectedDate.getDate():t.selectedDay=null,t.isDateSelectable=function(e,t,a){var n=new Date(t+1+"-"+e+"-"+a);if(n.setHours(0,0,0,0),r.futureOnly){var l=new Date;return l.setHours(0,0,0,0),n>=l}if(isNaN(Date.parse(r.startDate))||isNaN(Date.parse(r.endDate))){if(!isNaN(Date.parse(r.startDate))&&isNaN(Date.parse(r.endDate))){var i=new Date(r.startDate);return i.setHours(0,0,0,0),i<=n}if(isNaN(Date.parse(r.startDate))&&!isNaN(Date.parse(r.endDate))){var s=new Date(r.endDate);return s.setHours(0,0,0,0),n<=s}return!0}var i=new Date(r.startDate),s=new Date(r.endDate);return i.setHours(0,0,0,0),s.setHours(0,0,0,0),i<=n&&n<=s}}),t.addMonth=function(e){t.mv=d(t.mv.year,t.mv.month+e)},t.setDate=function(e){var a=angular.element(e.target)[0];a.className.indexOf("selectable")!==-1&&(t.updateNgModel(parseInt(a.innerHTML)),t.closeOnSelect!==!1&&s.closeDatetimePicker())},t.updateNgModel=function(e){if(e=e?e:t.selectedDate.getDate(),t.selectedDate=new Date(t.mv.year,t.mv.month,e,t.inputHour,t.inputMinute,0),t.selectedDay=t.selectedDate.getDate(),r.ngModel){var n,l=s.triggerEl.scope();n=l.$eval(r.ngModel)&&"Date"===l.$eval(r.ngModel).constructor.name?new Date(a(t.selectedDate,c)):a(t.selectedDate,c),l.$eval(r.ngModel+"= date",{date:n})}},t.$on("$destroy",s.closeDatetimePicker)};return{restrict:"A",template:n,controller:"DatetimePickerCtrl",replace:!0,scope:{year:"=",month:"=",day:"=",hour:"=",minute:"=",dateOnly:"=",closeOnSelect:"="},link:c}};r.$inject=["$locale","dateFilter"],angular.module("angularjs-datetime-picker").directive("datetimePickerPopup",r);var l=function(e,t){return{require:"ngModel",link:function(e,a,n,r){e.$watch(n.ngModel,function(e){if(e&&""!=e){var t=new Date(e);r.$setValidity("date",!!t);var a=new Date;n.hasOwnProperty("futureOnly")&&r.$setValidity("future-only",!(t Date: Wed, 23 Nov 2016 16:33:05 +0530 Subject: [PATCH 12/29] updating version with name for making a differentiation with parent project --- bower.json | 2 +- gulpfile.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 2373103..d2f4564 100644 --- a/bower.json +++ b/bower.json @@ -1,5 +1,5 @@ { - "name": "angularjs-datetime-picker", + "name": "angularjs-datetime-picker-v0.2.0", "main": "angularjs-datetime-picker.js", "version": "0.2.0", "homepage": "https://github.com/mani-s17/angularjs-datetime-picker", diff --git a/gulpfile.js b/gulpfile.js index b3eff12..1eb960b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -8,6 +8,6 @@ gulp.task('build', function() { return gulp.src(['angularjs-datetime-picker.js']) .pipe(stripDebug()) .pipe(uglify()) - .pipe(rename('angularjs-datetime-picker.min.js')) + .pipe(rename('angularjs-datetime-picker-v0.2.0.min.js')) .pipe(gulp.dest('.')); }); diff --git a/package.json b/package.json index 41b59b5..aa40daf 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "angularjs-datetime-picker", + "name": "angularjs-datetime-picker-v0.2.0", "version": "0.2.0", "description": "Very Lightweight AngularJS DateTime Picker Without Using jQuery, bootStrap, or moment", "main": "angularjs-datetime-picker.js", From f49b902e72504ac09420bad0ef74d9edb49fc4cc Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Wed, 23 Nov 2016 16:36:42 +0530 Subject: [PATCH 13/29] Updating readme file --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e58df0a..c42083d 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ No JQuery, No Bootstrap, Just AngularJS (ver. 1.4+) To Get Started -------------- -For Bower users, +For npm users, - `$ bower install angularjs-datetime-picker` + `$ npm i angularjs-datetime-picker-v0.2.0` 1. Include `angularjs-datetime-picker.js` and `angularjs-datetime-picker.css` From cb28df30a5050606a6ec997ae075d0c395febb3b Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Wed, 23 Nov 2016 18:20:13 +0530 Subject: [PATCH 14/29] updating package name --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index d2f4564..0a62c40 100644 --- a/bower.json +++ b/bower.json @@ -1,5 +1,5 @@ { - "name": "angularjs-datetime-picker-v0.2.0", + "name": "angularjs-datetime-picker-v2", "main": "angularjs-datetime-picker.js", "version": "0.2.0", "homepage": "https://github.com/mani-s17/angularjs-datetime-picker", diff --git a/package.json b/package.json index aa40daf..61db5a2 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "angularjs-datetime-picker-v0.2.0", + "name": "angularjs-datetime-picker-v2", "version": "0.2.0", "description": "Very Lightweight AngularJS DateTime Picker Without Using jQuery, bootStrap, or moment", "main": "angularjs-datetime-picker.js", From d84eeea665e525ae0cff1ba1022ca262846fd33e Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Wed, 23 Nov 2016 18:25:19 +0530 Subject: [PATCH 15/29] Updating minified lib file name to v2 --- ...etime-picker.min.js => angularjs-datetime-picker-v0.2.0.min.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename angularjs-datetime-picker.min.js => angularjs-datetime-picker-v0.2.0.min.js (100%) diff --git a/angularjs-datetime-picker.min.js b/angularjs-datetime-picker-v0.2.0.min.js similarity index 100% rename from angularjs-datetime-picker.min.js rename to angularjs-datetime-picker-v0.2.0.min.js From 144730c48eae4218e220b1502f721913992256f4 Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Wed, 23 Nov 2016 18:32:00 +0530 Subject: [PATCH 16/29] reverting back to old lib file name --- ...ime-picker-v0.2.0.min.js => angularjs-datetime-picker.min.js | 0 gulpfile.js | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename angularjs-datetime-picker-v0.2.0.min.js => angularjs-datetime-picker.min.js (100%) diff --git a/angularjs-datetime-picker-v0.2.0.min.js b/angularjs-datetime-picker.min.js similarity index 100% rename from angularjs-datetime-picker-v0.2.0.min.js rename to angularjs-datetime-picker.min.js diff --git a/gulpfile.js b/gulpfile.js index 1eb960b..b3eff12 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -8,6 +8,6 @@ gulp.task('build', function() { return gulp.src(['angularjs-datetime-picker.js']) .pipe(stripDebug()) .pipe(uglify()) - .pipe(rename('angularjs-datetime-picker-v0.2.0.min.js')) + .pipe(rename('angularjs-datetime-picker.min.js')) .pipe(gulp.dest('.')); }); From ae2b5508ec728cc447adfa00ae15691160ca488a Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Thu, 8 Dec 2016 14:57:59 +0530 Subject: [PATCH 17/29] Adding onchange call back functionality --- angularjs-datetime-picker.js | 5 ++++- index.html | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/angularjs-datetime-picker.js b/angularjs-datetime-picker.js index d2e7cf8..24bfeea 100644 --- a/angularjs-datetime-picker.js +++ b/angularjs-datetime-picker.js @@ -356,6 +356,8 @@ if( attrs.hasOwnProperty('futureOnly') ){ ctrl.$setValidity('future-only', date < now? false : true); } + var callback = element.scope().$eval(attrs.onChangeCallback); + callback && typeof callback === 'function' && callback(); }); element[0].addEventListener('click', function() { @@ -372,7 +374,8 @@ futureOnly: attrs.futureOnly, startDate: attrs.startDate, endDate: attrs.endDate, - closeOnSelect: attrs.closeOnSelect + closeOnSelect: attrs.closeOnSelect, + onChangeCallback: attrs.onChangeCallback }); }); } diff --git a/index.html b/index.html index 472ef1b..d57e106 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,9 @@ angular.module('myApp',['angularjs-datetime-picker']); angular.module('myApp').run(function($rootScope) { $rootScope.gmtDate = new Date('2015-01-01 00:00:00 -00:00'); + $rootScope.callback = function () { + console.log("Calender date had changed"); + } }); @@ -22,7 +25,7 @@

Datetime Picker



<input ng-model="date1" datetime-picker date-only future-only />
-

+

<input ng-model="date6" datetime-picker date-only start-date="11-20-2016" end-date="22-25-2017" />


From 28872d099da0274dbcb777935e520c60bf3bcaf7 Mon Sep 17 00:00:00 2001 From: Subramaniam S Date: Thu, 8 Dec 2016 16:39:00 +0530 Subject: [PATCH 18/29] Bug fix: callback implementation for cleaning up data as well --- angularjs-datetime-picker.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/angularjs-datetime-picker.js b/angularjs-datetime-picker.js index 24bfeea..7165d74 100644 --- a/angularjs-datetime-picker.js +++ b/angularjs-datetime-picker.js @@ -346,7 +346,9 @@ link: function(scope, element, attrs, ctrl) { // Attach validation watcher scope.$watch(attrs.ngModel, function(value) { - if( !value || value == '' ){ + var callback = element.scope().$eval(attrs.onChangeCallback); + if( !value || value == '' ) { + callback && typeof callback === 'function' && callback(); return; } // The value has already been cleaned by the above code @@ -356,7 +358,6 @@ if( attrs.hasOwnProperty('futureOnly') ){ ctrl.$setValidity('future-only', date < now? false : true); } - var callback = element.scope().$eval(attrs.onChangeCallback); callback && typeof callback === 'function' && callback(); }); From 7c2cbdc37072260a898ead88487635e2995fb0e2 Mon Sep 17 00:00:00 2001 From: Shivangi Sinha Date: Mon, 12 Dec 2016 19:06:31 +0530 Subject: [PATCH 19/29] "-" replaced with "/" for compatibility with mozilla --- .idea/angularjs-datetime-picker.iml | 9 + .idea/dictionaries/subramaniam.xml | 3 + .idea/encodings.xml | 6 + .idea/misc.xml | 85 ++++ .idea/modules.xml | 8 + .idea/vcs.xml | 6 + .idea/workspace.xml | 627 ++++++++++++++++++++++++++++ angularjs-datetime-picker.js | 3 +- index.html | 3 +- 9 files changed, 748 insertions(+), 2 deletions(-) create mode 100644 .idea/angularjs-datetime-picker.iml create mode 100644 .idea/dictionaries/subramaniam.xml create mode 100644 .idea/encodings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/angularjs-datetime-picker.iml b/.idea/angularjs-datetime-picker.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/angularjs-datetime-picker.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/dictionaries/subramaniam.xml b/.idea/dictionaries/subramaniam.xml new file mode 100644 index 0000000..e03b0de --- /dev/null +++ b/.idea/dictionaries/subramaniam.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..300e980 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + Android Lint + + + + + Android + + + + + + + + + + + groovy-1.8.6 + + + + + + + + JDK_1.8 + + + + + + + + JDK_1.8 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..1b7ae4d --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..84c297c --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,627 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + datetime-picker + dateFilter + dateFormat + onChangeCallback + onCh + future + callback + $eval + here + date-only + dateOnly + future-only + futureOnly + some + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1481540185631 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/angularjs-datetime-picker.js b/angularjs-datetime-picker.js index 7165d74..8fb0a61 100644 --- a/angularjs-datetime-picker.js +++ b/angularjs-datetime-picker.js @@ -211,6 +211,7 @@ ctrl.triggerEl = angular.element(element[0].triggerEl); if (attrs.ngModel) { // need to parse date string var dateStr = ''+ctrl.triggerEl.scope().$eval(attrs.ngModel); + console.log(dateStr); if (dateStr) { if (!dateStr.match(/[0-9]{2}:/)) { // if no time is given, add 00:00:00 at the end dateStr += " 00:00:00"; @@ -258,7 +259,7 @@ } scope.isDateSelectable = function (day, month, year) { - var someday = new Date((month+1) + '-' + day + '-' + year); + var someday = new Date((month+1) + '/' + day + '/' + year); someday.setHours(0,0,0,0); if (attrs.futureOnly) { var today = new Date(); diff --git a/index.html b/index.html index d57e106..384b445 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,7 @@ + @@ -15,7 +16,7 @@ From d47a3b87477ab0f08ea1c631d2e60d4f0705dc2e Mon Sep 17 00:00:00 2001 From: Shivangi Sinha Date: Tue, 13 Dec 2016 12:26:16 +0530 Subject: [PATCH 20/29] "-" replaced with "/" for compatibility with firefox --- .idea/workspace.xml | 136 ++++++++++++++++++++++++----------- angularjs-datetime-picker.js | 2 +- index.html | 14 ++-- 3 files changed, 103 insertions(+), 49 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 84c297c..dd62e13 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,7 +2,7 @@ - + @@ -21,25 +21,25 @@ - - + + - - + + - + - - + + - - + + @@ -51,7 +51,6 @@ datetime-picker dateFilter - dateFormat onChangeCallback onCh future @@ -59,10 +58,19 @@ $eval here date-only - dateOnly future-only futureOnly some + dateformat + format + dateOnly + someday + dateFormat + startDate + attrs.startDate + date-format + gmtDate + someda @@ -108,7 +116,6 @@ - @@ -138,6 +145,7 @@ + @@ -397,6 +405,7 @@ + @@ -518,6 +527,12 @@ + project + + + + + @@ -544,45 +559,47 @@ \ No newline at end of file diff --git a/angularjs-datetime-picker.js b/angularjs-datetime-picker.js index 8fb0a61..2f412ab 100644 --- a/angularjs-datetime-picker.js +++ b/angularjs-datetime-picker.js @@ -255,7 +255,7 @@ if (scope.mv.year == scope.selectedDate.getFullYear() && scope.mv.month == scope.selectedDate.getMonth()) { scope.selectedDay = scope.selectedDate.getDate(); } else { - scope.selectedDay = null; + scope.selectedDay = null;a } scope.isDateSelectable = function (day, month, year) { diff --git a/index.html b/index.html index 384b445..612115b 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@