Giter Site home page Giter Site logo

Comments (7)

LinkBenjamin avatar LinkBenjamin commented on August 23, 2024

#32

This closed thread might help you. I pass in the results of a RESTful service to my calendar object.

from monthly.

NitishKumarPatra avatar NitishKumarPatra commented on August 23, 2024

Thank u @LinkBenjamin for your quick reply. What i see is that the jsonUrl we pass as a parameter generally requires a filepath. You are still Passing [ jsonUrl: '/api/public/eventcalendar' ] in the closure. I am planning to make an Ajax call to a Controller. How do you intercept the issue? Will that work?

from monthly.

LinkBenjamin avatar LinkBenjamin commented on August 23, 2024

The filepath is actually a URL. I just used a relative path rather than absolute:

http://www.mywebsite.com/api/public/eventcalendar would work just fine in that field, assuming that you had a controller mapped to respond from there.

from monthly.

NitishKumarPatra avatar NitishKumarPatra commented on August 23, 2024

Thanks @LinkBenjamin ,i will get back once i resolve the issue.

from monthly.

NitishKumarPatra avatar NitishKumarPatra commented on August 23, 2024

Hi @LinkBenjamin ,it worked well using a ajax route to controller,now i am able to get the events over it. I have got another issue, i want to destroy the calendar instance on a particular button click.Is that possible?Or we have to manually empty() the row/div using jquery?

from monthly.

LinkBenjamin avatar LinkBenjamin commented on August 23, 2024

You have to empty() it. Here's the refreshCalendar() method I wrote for my app, based on a series of checkboxes and a dropdown (there's an expiration date and a scheduled update date in my app, and I let the users filter the calendar by either one).

	function refreshCalendar(){
		var dateFilter = $('#dateField').val();
        
        var selected = new Array();

        $("input:checkbox[name=itemtypelist]:checked").each(function() {
             selected.push($(this).val());
        });
        
        newid= new Date().getTime();
        
        $('.monthly').empty().replaceWith('<div class="monthly" id="cal' + newid + '"></div>');
        $('#cal' + newid).monthly({
            mode: 'event',
            jsonUrl: '/api/public/eventcalendar?dateFilter=' + encodeURIComponent(dateFilter) + '&itemtypelist=' + selected,
            dataType: 'json'
        });
	}

from monthly.

NitishKumarPatra avatar NitishKumarPatra commented on August 23, 2024

@LinkBenjamin Thanks for the guidance, i too had to empty it using jquery,i was using a toggle row for each person's schedule,and empty the remaining others' toggle row view when one is clicked. Wished, this plugin would have come up with a destroy() method. Plus something is very annoying in this plugin is that it has appended url to all anchor tags which i think is not useful, at least in my usage case. It calls for an ajax to run on every click,which repopulates the events one on another on the same month,with same data. I had to rectify it myself. Hope so we get a view option set so that we don't have to many clicks to see the day schedule (like monthly, weekly, or daily view, so that the plugin initiates with the defined view ).

from monthly.

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.