Giter Club home page Giter Club logo

Comments (7)

baaaun avatar baaaun commented on May 24, 2024 2

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.

realjimjim avatar realjimjim commented on May 24, 2024 1

@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.

edlynvillegas avatar edlynvillegas commented on May 24, 2024

from evo-calendar.

eberhardst avatar eberhardst commented on May 24, 2024

Hello realjimjim, do you have any example?
best regards
Eberhard

from evo-calendar.

realjimjim avatar realjimjim commented on May 24, 2024

@eberhardst

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.

baaaun avatar baaaun commented on May 24, 2024

@eberhardst

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.

edlynvillegas avatar edlynvillegas commented on May 24, 2024

Hello @baaaun, 😄 I tried the JSON you provided and it worked perfectly.. Kindly check how you return the JSON from that file calendar.php
image

from evo-calendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.