Skip to content

Commit

Permalink
chore(release): update dist
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hamilton committed Feb 24, 2020
1 parent 0025e0d commit a9733cf
Show file tree
Hide file tree
Showing 70 changed files with 806 additions and 427 deletions.
2 changes: 1 addition & 1 deletion components/accordion.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/api.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 62 additions & 9 deletions components/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -845,15 +845,38 @@ $.fn.calendar = function(parameters) {

helper: {
isDisabled: function(date, mode) {
return mode === 'day' && ((settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
return (mode === 'day' || mode === 'month' || mode === 'year') && ((settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
if(typeof d === 'string') {
d = module.helper.sanitiseDate(d);
}
if (d instanceof Date) {
return module.helper.dateEqual(date, d, mode);
}
if (d !== null && typeof d === 'object' && d[metadata.date]) {
return module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]), mode);
if (d !== null && typeof d === 'object') {
if (d[metadata.year]) {
if (typeof d[metadata.year] === 'number') {
return date.getFullYear() == d[metadata.year];
} else if (Array.isArray(d[metadata.year])) {
return d[metadata.year].indexOf(date.getFullYear()) > -1;
}
} else if (d[metadata.month]) {
if (typeof d[metadata.month] === 'number') {
return date.getMonth() == d[metadata.month];
} else if (Array.isArray(d[metadata.month])) {
return d[metadata.month].indexOf(date.getMonth()) > -1;
} else if (d[metadata.month] instanceof Date) {
var sdate = module.helper.sanitiseDate(d[metadata.month]);
return (date.getMonth() == sdate.getMonth()) && (date.getFullYear() == sdate.getFullYear())
}
} else if (d[metadata.date] && mode === 'day') {
if (d[metadata.date] instanceof Date) {
return module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]), mode);
} else if (Array.isArray(d[metadata.date])) {
return d[metadata.date].some(function(idate) {
return module.helper.dateEqual(date, idate, mode);
});
}
}
}
}));
},
Expand All @@ -875,10 +898,9 @@ $.fn.calendar = function(parameters) {
}
},
findDayAsObject: function(date, mode, dates) {
if (mode === 'day') {
var i = 0, il = dates.length;
if (mode === 'day' || mode === 'month' || mode === 'year') {
var d;
for (; i < il; i++) {
for (var i = 0; i < dates.length; i++) {
d = dates[i];
if(typeof d === 'string') {
d = module.helper.sanitiseDate(d);
Expand All @@ -888,8 +910,37 @@ $.fn.calendar = function(parameters) {
dateObject[metadata.date] = d;
return dateObject;
}
else if (d !== null && typeof d === 'object' && d[metadata.date] && module.helper.dateEqual(date,module.helper.sanitiseDate(d[metadata.date]), mode) ) {
return d;
else if (d !== null && typeof d === 'object') {
if (d[metadata.year]) {
if (typeof d[metadata.year] === 'number' && date.getFullYear() == d[metadata.year]) {
return d;
} else if (Array.isArray(d[metadata.year])) {
if (d[metadata.year].indexOf(date.getFullYear()) > -1) {
return d;
}
}
} else if (d[metadata.month]) {
if (typeof d[metadata.month] === 'number' && date.getMonth() == d[metadata.month]) {
return d;
} else if (Array.isArray(d[metadata.month])) {
if (d[metadata.month].indexOf(date.getMonth()) > -1) {
return d;
}
} else if (d[metadata.month] instanceof Date) {
var sdate = module.helper.sanitiseDate(d[metadata.month]);
if ((date.getMonth() == sdate.getMonth()) && (date.getFullYear() == sdate.getFullYear())) {
return d;
}
}
} else if (d[metadata.date] && mode === 'day') {
if (d[metadata.date] instanceof Date && module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]), mode)) {
return d;
} else if (Array.isArray(d[metadata.date])) {
if(d[metadata.date].some(function(idate) { return module.helper.dateEqual(date, idate, mode); })) {
return d;
}
}
}
}
}
}
Expand Down Expand Up @@ -1576,7 +1627,9 @@ $.fn.calendar.settings = {
type: 'type',
monthOffset: 'monthOffset',
message: 'message',
class: 'class'
class: 'class',
month: 'month',
year: 'year'
},

eventClass: 'blue'
Expand Down
4 changes: 2 additions & 2 deletions components/calendar.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions components/checkbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@
cursor: default !important;
opacity: 0.5;
color: #000000;
pointer-events: none;
}

/*--------------
Expand Down
Loading

0 comments on commit a9733cf

Please sign in to comment.