Comments (7)
Iam Calling the event like this ---> 'calendarEvents': 'calendar.php'
but when execute doesnt work the error is : Event named: "undefined" doesn't have a unique ID but the json is ;
[{"id":14,"name":"sdfsdf","date":"2020/06/23","type":"event","everyYear":"false"},{"id":9,"name":"Eliminar los fallidos","date":"2020/06/23","type":"event","everyYear":"false"},{"id":11,"name":"TAREA LEO","date":"2020/06/23","type":"event","everyYear":"false"},{"id":12,"name":"Prueba dsfsdf","date":"2020/06/23","type":"holiday","everyYear":"false"},{"id":8,"name":"ingreso datos nuevo cliente","date":"2020/06/23","type":"holiday","everyYear":"false"}]
whats is wrong ??
from evo-calendar.
@eberhardst it work with PHP well if you echo your database value with php inside the javascript where it marking the event, then it will work like a charm!
from evo-calendar.
from evo-calendar.
Hello realjimjim, do you have any example?
best regards
Eberhard
from evo-calendar.
as you can see from the example:
{ name: "New Year", date: "Wed Jan 01 2020 00:00:00 GMT-0800 (Pacific Standard Time)", type: "holiday", everyYear: true },
{ name: "Valentine's Day", date: "Fri Feb 14 2020 00:00:00 GMT-0800 (Pacific Standard Time)", type: "holiday", everyYear: true },
{ name: "Patient #1", date: "2020-01-30", type: "event" },
{ name: "Patient #3", date: "February/3/2020", type: "event" },
{ name: "Patient #4", date: "February/3/2020", type: "event" },
{ name: "Holiday #3", date: "February/3/2020", type: "holiday" },
{ name: "Birthday #2", date: "February/3/2020", type: "birthday" },
{ name: "Author's Birthday", date: "February/15/2020", type: "birthday", everyYear: true },
{ name: "Holiday #4", date: "February/15/2020", type: "event" },
{ name: "Patient #2", date: "February/8/2020", type: "event" },
{ name: "Leap day", date: "February/29/2020", type: "holiday", everyYear: true }
just fetch the data from your database and echo it here using php, for example here i using foreach to replace the example code, you can use for loop or while loop too:
foreach ($query->result() as $key) {
echo '{ name: "'.$key->name.'", date: "'.$key->date.'", type: "'.$key->type.'", everyYear:'.$key->yearly.' }',
}
anyway this is just one of the many method, you can use any other better method than mine for apply.
:)
from evo-calendar.
como puedes ver en el ejemplo:
{nombre: "Año Nuevo", fecha: "Mié 01 de enero de 2020 00:00:00 GMT-0800 (hora estándar del Pacífico)", escriba: "vacaciones", cada año: verdadero},
{nombre: "Día de San Valentín", fecha : "Vie 14 de febrero de 2020 00:00:00 GMT-0800 (hora estándar del Pacífico)", escriba: "vacaciones", cada año: verdadero},
{nombre: "Paciente n.º 1 ", fecha: "2020-01-30" , escriba: "evento"},
{nombre: "Paciente n.º 3 ", fecha: "febrero / 3/2020", escriba: "evento"},
{nombre: "Paciente n.º 4 ", fecha: "febrero / 3 / 2020 ", escriba:" evento "},
{nombre:" Vacaciones # 3 ", fecha:" 3 / febrero / 2020 ", escriba:" vacaciones "},
{nombre: "Cumpleaños # 2 ", fecha: "3 / febrero / 2020", tipo: "cumpleaños"},
{nombre: "Cumpleaños del autor", fecha: "15 / febrero / 2020", tipo: "cumpleaños", cada año: verdadero},
{nombre: "Vacaciones # 4 ", fecha: "15 / febrero / 2020", escriba: "evento"},
{nombre: "Paciente # 2 ", fecha: "8 de febrero / 2020", tipo: "evento"},
{nombre: "Día bisiesto", fecha: "29 de febrero / 2020", tipo : "vacaciones", cada año: verdadero}simplemente obtenga los datos de su base de datos y repítalos aquí usando php, por ejemplo, aquí estoy usando foreach para reemplazar el código de ejemplo, puede usar for loop o while loop también:
foreach ($ query-> result () como $ key) {
echo '{name: "'. $ key-> name. '", date: "'. $ key-> date. '", type: "'. $ key-> type. '", everyYear:'. $ key-> annual. ' } ',
}de todos modos, este es solo uno de los muchos métodos, puede usar cualquier otro método mejor que el mío para aplicar.
:)
hi, you hace the example in JS,becouse i have the json in php, but the function eventcalendar doesnt work
from evo-calendar.
Hello @baaaun, 😄 I tried the JSON you provided and it worked perfectly.. Kindly check how you return the JSON from that file calendar.php
from evo-calendar.
Related Issues (20)
- Uncaught TypeError: Cannot read properties of null (reading 'find') HOT 1
- EvoCalendar can not be destroy
- How to add events with time? HOT 4
- Event Header Wrong
- Monthly event list instead of day
- Feature Request - Is it possible to show weeks or 2 weeks range in calendar ?
- format.toValue and format.toDisplay undefined
- How to get current month? HOT 1
- How I can get all events for the month? HOT 1
- Fetch events from db? HOT 4
- Style issue with iPad tablets HOT 1
- change gregorian calendar to solar hijri calendar
- How can I make it so that the months can be switched by the scroll wheel?
- Pleaaaase Add Solar Calendar (Jalai Hijri) Too
- selectYear functionality not working HOT 2
- event title limit HOT 1
- add language Korean
- In safari, the title part works as NaN.
- Show all the events from the selected month HOT 1
- adding a czech language/translation HOT 4
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 evo-calendar.