Code Monkey home page Code Monkey logo

Comments (16)

robccc avatar robccc commented on July 30, 2024 4

Darren this is possible, kind of.
I did it by deleting the calendar and reloading it.
comment out this line in the original js
$calendarElement.attr('id', "zabuto_calendar_" + Math.floor(Math.random() * 99999).toString(36));
This stops it overwriting your original id

then do something like this;
$("#my-calendar").empty();
reloadCal();

where reloadCal just contains your original js to load the cal. in the first place.

from calendar.

combomatrix avatar combomatrix commented on July 30, 2024 4

Thanks a lot @robccc, your solution worked perfectly!

I simply deleted the line j.attr("id","zabuto_calendar_"+Math.floor(Math.random()*99999).toString(36)); from the minified js.
Then emptied my div tag with $("#datePickerrr").empty(); and initialized the calendar again.

Thanks,
combomatrix

from calendar.

fro avatar fro commented on July 30, 2024

Hi, I'm looking for the same function.
Did you manage to find a proper way to do this ?

Add/remove events to the calendar ?

from calendar.

thespinningimage avatar thespinningimage commented on July 30, 2024

Hi

I managed to write my own which works okay (seems to), but couldn't find an easy way to call the drawcalendar function at the moment.

Unfortunately the code is on my work computer and I'm not now back in until the 5th Jan.

I have also integrated a bootstrap popup menu when you click a date, so it gives a list of possible events to add (or clear) if this is any use to you.

I'm happy to collaborate in the new year.

All the best

Darren

On 19 Dec 2014, at 17:01, Pourrier François [email protected] wrote:

Hi, I'm looking for the same function.
Did you manage to find a proper way to do this ?

Add/remove events to the calendar ?


Reply to this email directly or view it on GitHub.

from calendar.

thespinningimage avatar thespinningimage commented on July 30, 2024

Also I tried contacting the author but she never replied. Maybe you'd have more success?

On 19 Dec 2014, at 17:01, Pourrier François [email protected] wrote:

Hi, I'm looking for the same function.
Did you manage to find a proper way to do this ?

Add/remove events to the calendar ?


Reply to this email directly or view it on GitHub.

from calendar.

fro avatar fro commented on July 30, 2024

Nice! Maybe it's time to add a brand new zabuto extended calendar to Github ;-)

from calendar.

thespinningimage avatar thespinningimage commented on July 30, 2024

That would be good! I think it looks really great but it's too restricted.

Have a good Christmas and I'll catch up with you afterwards

Darren

On 19 Dec 2014, at 17:19, Pourrier François [email protected] wrote:

Nice! Maybe it's time to add a brand new zabuto extended calendar to Github ;-)


Reply to this email directly or view it on GitHub.

from calendar.

fro avatar fro commented on July 30, 2024

Hi Darren, I manage to extend the Zabuto plugin (now with public methods, more callback functions, ...), . I think I have what you are looking for... it's currently in progress but it seems to work. Interested? Let me know... ;-)

from calendar.

fro avatar fro commented on July 30, 2024

It's untested and lot's of features are missing but you should give it a peek:
http://francois-pourrier.com/work/zabuto-X/calendar.html
(try double-click and simple-click in day wrappers, simple-click on events)

Now I'm able to:

  • call public methods (to add just one event at a time)
  • init calendar with local json + ajax data
  • add event through a modal (not the modal included in zabuto calendar, I've removed it)
  • show a list of events of a day
  • ...

It's only few hours of work, there's lot of features to add and things to do to make it stable but it's usable. ;-)

from calendar.

thespinningimage avatar thespinningimage commented on July 30, 2024

Hi

It looks great. Unfortunately until I get back into work I can't see how it would work with mine. I like the event display better too.

Re the popup - for mine I only get a series of actions each day (it's a utility to run reports daily/weekly/monthly/none) so all I need is a simple menu to appear with these selections.

I'm sorry I can't help until I go back to work on the 5th but rest assured you are doing a great job! :)

Has Zabuto got back to you? I was surprised she had no interest in her own plugin

Darren

On 21 Dec 2014, at 01:16, Pourrier François [email protected] wrote:

It's untested and lot's of features are missing but you should give it a peek:
http://francois-pourrier.com/work/zabuto-X/calendar.html
(try double-click and simple-click in day wrappers, simple-click on events)

Now I'm able to:

call public methods (to add just one event at a time)
init calendar with local json + ajax data
add event through a modal (not the modal included in zabuto calendar, I've removed it)
show a list of events of a day
...
It's only few hours of work, there's lot of features to add and things to do to make it stable but it's usable. ;-)


Reply to this email directly or view it on GitHub.

from calendar.

fro avatar fro commented on July 30, 2024

I've discovered Zabuto's work 2 days ago... I assume she's on holidays.
Not a lot of activity for this project : https://github.com/zabuto/calendar/graphs/contributors

from calendar.

thespinningimage avatar thespinningimage commented on July 30, 2024

Hi Fro,

your customisations are excellent and you know javascript at a far more advanced level than I ever will! I just wondered if there is any way to cause a refresh of a date cell easily in the original Zabuto calendar?

thanks

Darren

from calendar.

fro avatar fro commented on July 30, 2024

Hi Darren,

Unfortunately, I don't think it's possible with the original Zabuto code. :-(

from calendar.

fro avatar fro commented on July 30, 2024

Hi, someone has asked my for my customized Zabuto version. Don't have time to fork the project and do things the right way. So, here's a fiddle: http://jsfiddle.net/n2gkm4d9/ ;-)

from calendar.

dittops avatar dittops commented on July 30, 2024

Thanks @robccc , you solution is awesome. This saved my day :)

from calendar.

youmax210139 avatar youmax210139 commented on July 30, 2024

There is another way to avoid modifying the minified js.
$calendar = $("#calendar").zabuto_calendar({your_config});
Access the cell by
var date = '2019-01-01'; $("#"+$calendar.attr('id')+"_"+date
Here is the code snippet for selecting date programatically

$calendar = $("#calendar").zabuto_calendar({your_config});

function changeZabutoDate(date){
    var dates = date.split('-');
    $calendar.empty();  //remove current calendar
    $calendar.parent().append('<div id='calendar'></div>'); 
    $calendar = $("#calendar").zabuto_calendar({
           'year': dates[0],
           'month': dates[1]
       });  //
    $("#"+$calendar.attr('id')+"_"+date).addClass('active');
}

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