You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything is correct but the line 306 is not doing anything.
// v1.0.0 - Parse format (date)
EvoCalendar.prototype.parseFormat = function(format) {
var _ = this;
if (typeof format.toValue === 'function' && typeof format.toDisplay === 'function')
return format;
// IE treats \0 as a string end in inputs (truncating the value),
// so it's a bad format delimiter, anyway
var separators = format.replace(_.initials.validParts, '\0').split('\0'),
parts = format.match(_.initials.validParts);
if (!separators || !separators.length || !parts || parts.length === 0){
console.log("%c Invalid date format ", "color:white;font-weight:bold;background-color:#e21d1d;");
}
return {separators: separators, parts: parts};
};
// v1.0.0 - Format date
EvoCalendar.prototype.formatDate = function(date, format, language) {
var _ = this;
if (!date)
return '';
language = language ? language : _.defaults.language
if (typeof format === 'string')
format = _.parseFormat(format);
if (format.toDisplay) #This is the line 306 in the code.
return format.toDisplay(date, format, language);
var ndate = new Date(date);
// if (!_.isValidDate(ndate)) { // test
// ndate = new Date(date.replace(/-/g, '/'))
// }
var val = {
d: ndate.getDate(),
D: _.initials.dates[language].daysShort[ndate.getDay()],
DD: _.initials.dates[language].days[ndate.getDay()],
m: ndate.getMonth() + 1,
M: _.initials.dates[language].monthsShort[ndate.getMonth()],
MM: _.initials.dates[language].months[ndate.getMonth()],
yy: ndate.getFullYear().toString().substring(2),
yyyy: ndate.getFullYear()
};
val.dd = (val.d < 10 ? '0' : '') + val.d;
val.mm = (val.m < 10 ? '0' : '') + val.m;
date = [];
var seps = $.extend([], format.separators);
for (var i=0, cnt = format.parts.length; i <= cnt; i++){
if (seps.length)
date.push(seps.shift());
date.push(val[format.parts[i]]);
}
return date.join('');
};
When I go to the DOM and see the eventList is showing ,as a title, NaN, NaN
How do I solve this issue as I think is giving a non show error to display the event tag with the data.
The text was updated successfully, but these errors were encountered:
I have an issue with parsing dates format.
Everything is correct but the line 306 is not doing anything.
When I go to the DOM and see the eventList is showing ,as a title, NaN, NaN
How do I solve this issue as I think is giving a non show error to display the event tag with the data.
The text was updated successfully, but these errors were encountered: