Comments (4)
Hello,
I was looking into your code, and apparently, you have been initializing the Organizer with empty server data. Now, I see that you are trying to get them via Ajax, but after you are getting them with ajax, you are not updating the Organizer's Data with the new data.
In order to use Ajax, I have had a small tutorial on the README.md.
What you're gonna want to do is, not initialize the Organizer until you have actual data from an Ajax request on Load.
Then, you want to setup an On Month Change Event Listener in order to change the Data according to the Month you are on.
organizer.onMonthChange = function (callback) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
// TODO : Change the Organizer's Data to the new Data
// TODO : that you just grabbed from the Ajax Request
organizer.data = this.responseText;
// TODO : Call the Callback to display the Data
callback();
}
};
xhttp.open("GET", "someurl.json", true);
xhttp.send();
};
There is also an example regarding that. I hope it works, have a good day!
from calendar-javascript-lib.
Please let me know when your problem is used after reading the example so that we close the issue.
from calendar-javascript-lib.
Are you still facing an issue ? Or not ?
It is much better if you assist me in closing the issue, rather keeping it open.
from calendar-javascript-lib.
from calendar-javascript-lib.
Related Issues (20)
- I want to disable previous dates HOT 5
- How can I put the calendar in the center of my webpage, sorry I am new to webpage HOT 1
- Calendar is not defined HOT 1
- showing amount of events in the calendar HOT 3
- how to customise the calendar to highlight current date and is it possible to disable previous dates HOT 1
- how to Multiple select dates HOT 6
- "Basic usage" does not work HOT 3
- calendar ajax with API request. HOT 1
- Add URL for events? HOT 3
- Doesn't work on Samsung Browser HOT 4
- 25% of Events are Not Printing on the Organizer HOT 12
- The Calendar and Organizer do not show the data when pulled from Database HOT 2
- Calendar does not display all events correctly HOT 2
- How to set full day event? HOT 4
- Format Date in Organizer Container HOT 2
- Could I use HTML tag in Event text? HOT 2
- "Feburary" is misspelled. HOT 2
- Text for empty results? HOT 7
- [question] License HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calendar-javascript-lib.