jhonis / e-calendar Goto Github PK
View Code? Open in Web Editor NEWjQuery plugin for create a calendar with events.
License: GNU General Public License v3.0
jQuery plugin for create a calendar with events.
License: GNU General Public License v3.0
d.getMonth gives a value between 0 and 11; it seems to me you're using them incorrectly.
I had an issue where all Dates passed via ISO-Date-String got off by one (e.g. displayed in May when they really were in June).
So, remove the (-1) next to d.getMonth() in Lines 125 and 140 and add (+1) on Line 141.
Sorry, I can't really provide you with a Testcase, but it seems to work now for me.
Hello, Really great calendar! I want to get the value of the date on click. Any suggestions?
Hello. Can we set start month for calendar?
wrong:
var dLastDayOfPreviousMonth = new Date(dYear, dMonth + 1, 0).getDate() - dWeekDayOfMonthStart + 1;
correct:
var dLastDayOfPreviousMonth = new Date(dYear, dMonth, 0).getDate() - dWeekDayOfMonthStart + 1;
please check the dates of 2017-06, and you can see the dates of pre-month is wrong.
d.getDate is not a function Line - 140
When I fetch events from API on next/prev month change events don't appear because sometimes API is late and only DOM renders so calendar shows no events. I need to render calendar and fetched events simultaneously. I tried to use SetTimeout method but it doesn't work always. What's the best way to fix this issue?
Hello i found this plugin very useful , but i want to work with my api that return a json data.
I dont know how to work with events option in the parametres to add a dynamic url , please help me .
Thanks .
Hello,
It would be nice to have an option for setting "Monday" to first day of the week instead of Sunday. It's an option on most calendars out there. I haven't found a way to hardcode it :(
I would like to add date filter function attached to the calendar. So that I can only display events within a specified date range.
For example:
I want event list to only show events from date 2019-08-01 until 2019-10-30.
Is that possible to do so? Thanks in advance!
Is there anyway to use loop inside ecalendar i do need to add the custom events which should be inside loop ?
Any way to add URL to either title or description? So i can link to predefined page when this link is clicked?
events: [
{title: 'Event Title 1', description: 'Description 1', datetime: new Date(2016, 0, 12, 17)},
{title: 'Event Title 2', description: 'Description 2', datetime: new Date(2016, 0, 23, 16)}`
],
Since it accepts only sharp times such as 2:00, 12:00, 16:00 and throws error when mentioned it as 2:13, 16:34, this makes the code less usable and practical because the events are not always on sharp and complete hour times. It cant be at any minute of the hour.
Can this be already done and i'm unaware ?
I would like to know how can we make it accept any time instead of just sharp times
@jhonis
If we have events on December, it can't show. If we pass events to the next year of January it shows again.
Is there a way to change the date format to the US format MM/DD/YYYY
There is 31 in January but when i turn to February it shows that January only has 28.please fix this
Hey, great calender - i would use it in my project but i need something like priority handling ?
It is possibe to add ?
for example something like
priority: 'high'
priority: 'medium' (this default if not set)
priority: 'low'
.c-event {
background-color: darkgrey;
color: white;
font-weight: bold;
cursor: pointer;
}
.c-event-high {
background-color: grey;
color: white;
font-weight: bold;
cursor: pointer;
}
.c-event-low {
background-color: lightgrey;
color: white;
font-weight: bold;
cursor: pointer;
}
for (var j = 0; j < settings.events.length; j++) {
var d = settings.events[j].datetime;
// default priority = 'medium'
var p = settings.events[j].priority;
if (typeof p === "undefined") {
p = 'medium';
settings.events[j].priority = p;
}
if (d.getDate() == day && d.getMonth() == dMonth && d.getFullYear() == dYear) {
if (p == 'high' && !cDay.hasClass("c-event-high")) {
cDay.addClass('c-event-high').attr('data-event-day', d.getDate());
}
if (p == 'medium' && !cDay.hasClass("c-event-high") && !cDay.hasClass("c-event")) {
cDay.addClass('c-event').attr('data-event-day', d.getDate());
}
if (p == 'low' && !cDay.hasClass("c-event-high") && !cDay.hasClass("c-event") && !cDay.hasClass("c-event-low") ) {
cDay.addClass('c-event-low').attr('data-event-day', d.getDate());
}
cDay.addClass('c-event').attr('data-event-day', d.getDate());
cDay.on('mouseover', mouseOverEvent).on('mouseleave', mouseLeaveEvent);
}
}
...
Hi,
how can I raise onClick event , when a user click on a date ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.