Skip to content

Commit

Permalink
[Calendar] "get date": fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dreaming-augustin committed Dec 23, 2024
1 parent 184a068 commit 62d9c6a
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/definitions/modules/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -802,28 +802,32 @@
formattedDate: function (format, date) {
return module.helper.dateFormat(format || formatter[settings.type], date || module.get.date());
},
date: function (format = "") {
date: function (format = '') {
if (!module.helper.sanitiseDate($module.data(metadata.date))) {
return null;
}
else if (format == "") {

if (format === '') {
return module.helper.sanitiseDate($module.data(metadata.date));
}

return module.helper.dateFormat(format, $module.data(metadata.date));
},
inputDate: function () {
return $input.val();
},
focusDate: function (format = "") {
focusDate: function (format = '') {
if (!module.helper.sanitiseDate($module.data(metadata.focusDate))) {
return null;
}
else if (format == "") {

if (format === '') {
return module.helper.sanitiseDate($module.data(metadata.focusDate));
}

return module.helper.dateFormat(format, $module.data(metadata.focusDate));
},
startDate: function (format = "") {
startDate: function (format = '') {
var startModule = module.get.calendarModule(settings.startCalendar);

if (startModule) {
Expand All @@ -833,12 +837,14 @@
if (!module.helper.sanitiseDate($module.data(metadata.startDate))) {
return null;
}
else if (format == "") {

if (format === '') {
return module.helper.sanitiseDate($module.data(metadata.startDate));
}

return module.helper.dateFormat(format, $module.data(metadata.startDate));
},
endDate: function (format = "") {
endDate: function (format = '') {
var endModule = module.get.calendarModule(settings.endCalendar);

if (endModule) {
Expand All @@ -848,9 +854,11 @@
if (!module.helper.sanitiseDate($module.data(metadata.endDate))) {
return null;
}
else if (format == "") {

if (format === '') {
return module.helper.sanitiseDate($module.data(metadata.endDate));
}

return module.helper.dateFormat(format, $module.data(metadata.endDate));
},
minDate: function () {
Expand Down

0 comments on commit 62d9c6a

Please sign in to comment.