Code Monkey home page Code Monkey logo

calendar's Issues

I am unable to discrimiate badges

Good afternoon,
I try to adapt zabuto-calendar for my choral web site and I have a (big) problem. Heu, two : I am french and my english is sometime strange...

I have 3 types of rehearsal : ordinary, extra, and whole day rehearsal. there are also concerts. So I think I have to create 4 new event-types. OK. I would like to have 4 different colors but I am enable to write the correct lines in the css file. Yes, I am a newbie in HTML, CSS JavaScript...
I duplicate this section, changing event with extra-event, but I only obtain à red square, not a red badge.

/* actions and events */
div.zabuto_calendar .table tr td.extra-event div.day,
div.zabuto_calendar ul.legend li.extra-event {
background-color: red;
}
div.zabuto_calendar .extra-event,
div.zabuto_calendar div.legend span.extra-event {
background-color: red;
color: #ffffff;
text-shadow: none;
}

Could you help me ?
Best regards

Disable ajax cache

When the user creates a event and save it to database, just refreshing the page isn't enough to update the calendar, because the browser keeps the cache after loading a month.

JQuery has a option to disable the cache - cache : false - and will be great if it's available through the ajax option on calendar initialization.

And taking the opportunity... is there a way to do a "refresh" in the calendar, i.e., do a new ajax call to reload the events from the current month with the updated ones from the database?

Year view

Is there an option to display full year, all 12 months, or specify how many months I'd like to view?

turkish lang

case 'tr':
return {
month_labels: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"],
dow_labels: ["Pts", "Salı", "Çar", "Per", "Cuma", "Cts", "Paz"]
};
break;

Multiple dates

Until now, one can add only one date per day.
It would be really great if one could add multiple appointments and their time.

multiple dates

Is there anyway to mark multiple days if the event's duration is more than one day?

Thank you in advance!

Doesn't work with ASP.NET

I have tried using your calendar using ASP.NET instead of PHP but it seems that no matter how I tried I can't send the JSON expression to the ajax.
so please I would like you to inform me if it does have support for ASP.NET and I will write down my code if you have any tips for me

javascript

        $(document).ready(function () {
            $("#my-calendar").zabuto_calendar({
                language: "en", today: true, show_days: true, nav_icon: {
                    prev: '<i class="fa fa-chevron-circle-left"></i>',
                    next: '<i class="fa fa-chevron-circle-right"></i>'
                },
                ajax: {
                    url: "Default2.aspx/date",
                    modal: true,
                }
            });
        });

C#:

[WebMethod()] [ScriptMethod(UseHttpGet = true)]
public static string date()
{
    JavaScriptSerializer js = new JavaScriptSerializer();
    Event event1 = new Event();
    event1.date = "2014-3-20";
    event1.badge = true;
    event1.title = "Event";
    event1.body = "body";
    event1.footer = "footer";
    event1.classname = "purple-event";
    return "[" + js.Serialize(event1) + "]";


}

SK and HU language

Hi, Here is Slovak translation:


    case 'sk':
        return {
            month_labels: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"],
            dow_labels: ["Po", "Ut", "St", "Št", "Pi", "So", "Ne"]
        };
        break;

And here is Hungarian:
case 'hu':
return {
month_labels: ["Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"],
dow_labels: ["Hé", "Ke", "Sze", "Cs", "Pé", "Szo", "Va"]
};
break;

Date Format Change to DD/MM/YYYY

Hi,

the default of zabuto calendar is YYYY/MM/DD. So, I want to change the date format.

can someone help with this action onclick will appear to 27/07/2016 (DD/MM/YYYY)

thanks

wierd issue "calendar sometime not showing"

i have used this plugin and it works great but sometimes the calendar not rendered , it is not showing at all while the data exists , i can see the data in my console , can any one advise what to do ?

Year navigation

Hi is there a way to add new nav_icon to change year and not only month ?

Custom badge problem

Hello, these days, as i was working with the calendar i had to modify a piece of code so that i could add a custom class to the selected date. I didn't want to commit the changes on the repo because it may not be something you wanted, or i misunderstood it.

The original code is here:

// drawEvents function
...
if (typeof(value.badge) !== 'undefined' && value.badge !== false) {
    var badgeClass = (value.badge === true) ? '' : ' badge-' + value.badge;
    var dayLabel = $dayElement.data('day');
    $dayElement.html('<span class="badge badge-event' + badgeClass + '">' + dayLabel + '</span>');
}
...

The code seems to be able to take a class as a parameter ( besides true / false ) but the default class is also preserved, and may come in conflict with the one i supplied. ( default is orange and i want blue )

So i think it should look like this:

// drawEvents function
...
if (typeof(value.badge) !== 'undefined' && value.badge !== false) {
    var badgeClass = (value.badge === true) ? 'badge-event' : value.badge;
    var dayLabel = $dayElement.data('day');
    $dayElement.html('<span class="badge ' + badgeClass + '">' + dayLabel + '</span>');
}
...

Here is a fiddle i used for testing:
http://jsfiddle.net/1470bg5q/6/

You can also check and force a prefix to the class ( like 'badge-') but i think it might be confusing. People will add a class and expect that the same name will be used. Also they wont know the prefix until they search for it.

Hope this helps.

Change ajax url

Hi!

I need to change the ajax url every time a element change. I'm trying to do: rutaAjax = [ create url with other variables ] $("#my-calendar").zabuto_calendar({ [ ... ] ajax: { url: rutaAjax } }); every time, but this don't change the url. The url is the same has the first time the calendar is created. Any idea ?

duplicate id usage

the drawCalendar function adds a duplicate id in line 60:
var $containerHtml = $('<div class="zabuto_calendar" id="' + $calendarElement.attr('id') + '"></div>');

I'm not a zabuto calendar expert but this looks unnecessary and triggers an error in our testing tools.

French special characters not displayed correctly

I'm using this configuration

    <script>
       $(document).ready(function () {
            $("#my_calendar").zabuto_calendar({
                language: "fr",
                today: true
           });
        });
    </script>

But special characters for Décembre displays wrong Décembre 2018). How to fix this ?

Calendar do not show next months events,

Hello, I setup calendar by config like this :

<div id="item-calendar"></div>
<script type="text/javascript">
    //<!--
            $(document).ready(function () {
            var eventData = [{"date":"2016-1-22","title":"2016-1-22","classname":"grade-2","badge":false},{"date":"2016-1-21","title":"2016-1-21","classname":"grade-2","badge":false},{"date":"2016-1-20","title":"2016-1-20","classname":"grade-2","badge":false},{"date":"2016-1-19","title":"2016-1-19","classname":"grade-2","badge":false},{"date":"2016-1-18","title":"2016-1-18","classname":"grade-2","badge":false},{"date":"2016-1-17","title":"2016-1-17","classname":"grade-2","badge":false},{"date":"2016-1-16","title":"2016-1-16","classname":"grade-2","badge":false},{"date":"2016-1-15","title":"2016-1-15","classname":"grade-2","badge":false},{"date":"2016-1-14","title":"2016-1-14","classname":"grade-2","badge":false},{"date":"2016-1-05","title":"2016-1-05","classname":"grade-2","badge":false},{"date":"2016-1-04","title":"2016-1-04","classname":"grade-2","badge":false},{"date":"2016-1-03","title":"2016-1-03","classname":"grade-2","badge":false},{"date":"2016-1-02","title":"2016-1-02","classname":"grade-2","badge":false},{"date":"2016-1-01","title":"2016-1-01","classname":"grade-2","badge":false},{"date":"2015-12-31","title":"2015-12-31","classname":"grade-2","badge":false},{"date":"2015-12-30","title":"2015-12-30","classname":"grade-2","badge":false}];
            var legendData = [
                {type: "block", label: "Booked", classname: "grade-1"},
                {type: "block", label: "Non Available/Closed", classname: "grade-2"},
                {type: "block", label: "Today", classname: "grade-today"},
            ];
            $("#item-calendar").zabuto_calendar({
                cell_border: true,
                today: true,
                weekstartson: 0,
                language: "en",
                show_previous: false,
                show_next: 12,
                data: eventData,
                legend: legendData,
            });
        });
    //-->
</script>

This month days picked on calendar but next month days not show , see this images please :

snapshot41
snapshot42

can you please help us to fix this problem? thanks

json data not showing in modal window

Hi, I am a complete newbie so appreciate your help;
I saved a file with Json data
example calendar1.json
[{
"date": "2018-03-01",
"badge": true,
"title": "Tonight",
"body": "<p class="lead">Party</p>

Like it's 1999.</p>",
"footer": "At Paisley Park",
"classname": "purple-event"
}, {
"date": "2018-03-02",
"badge": true,
"title": "Tonight",
"body": "<p class="lead">Party</p>

Like it's 1999.</p>",
"footer": "At Paisley Park",
"classname": "purple-event"
}]

Now I try to pull this in modal using:-

<script type="application/x-javascript"> //$(document).ready(function () { $("#my-calendar").zabuto_calendar({ ajax: { url: "js/calendar1.json", modal: true, } }); // }); But it does not seem to work please your help is deeply appreciated.

event display with alert instead of modal

Is there any way to use alert instead of modal because the theme i am using is not supported with bootstrap 3. and has some modal issues already.
so if possible to display event with alert message then let me know. its really urgent ...

How to set Date passed on the url

I need to set the date passed on the url. http://forext.dev/blog-list?date=2019-02-01

If date is passed in the url set the calendar
$("#my-calendar").zabuto_calendar({
show_days: true,
today: true,
});

Click a day to open a new page

Hi there,

Really enjoying this calendar, and the modal popup integration.

I have multiple events that fall on one date - but at the minute can only get one event to show in the modal.

Is it possible to change it so that days with multiple events open a new page rather than a modal window?

Best regards :)

Nick

Get EventData's Title Value

Hi All,

I have the following script:

`<script type="application/javascript">
var eventData = [
{"date":"2015-01-01","badge":false,"title":"Example 1"},
{"date":"2015-01-02","badge":true,"title":"Example 2"}
];
$(document).ready(function () {
$("#my-calendar").zabuto_calendar({
data: eventData,
action: function () {
return myDateFunction(this.id);
}
});
});

function myDateFunction(id) {
var date = $("#" + id).data("date");
var hasEvent = $("#" + id).data("hasEvent");

// HOW TO GET VALUE OF "TITLE", ETC "EXAMPLE 1"

}
</script>`

My question is, how do we get the "title" value as we can obtain the value of "date" and "hasEvent"?

leap year

I have a problem in the view of an event for the day 29/02. Is there some setting to accept leap year?

thanks

How to listen clicks on prev or next month icon

Hi, I want to know if there is a way to listen event on lick of calendar-month-navigation please?
I can get alert on '.dow-clickable' but not Class: calendar-month-navigation or ID:zabuto_calendar_nav-prev
$('#zabutoCalendar').on('click','.dow-clickable',function(){
alert($(this).attr('id') +' '+ $(this).attr('data-time'));
});
$('#zabutoCalendar').on('click','

',function(){
alert(123);
});

Adding Events

I'm double clicking the calendar to add an event and nothing happens. How should I work for your own github so that people can use this as their own version of calendar for Macintosh or Google calendar?

Calendar cell refresh

Hi,

I've created a function that fires off when I click on a date cell. The function will either add or remove an event for the selected date depending on whether an event already exists or not.

Is there a way to refresh the display to show this new state for each clicked cell?

Thanks
Duncs

CS language

here is czech translation (cs)

case "cs":
      return {
        month_labels: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"],
        dow_labels: ["Po", "Út", "St", "Čt", "Pá", "So", "Ne"]
      };
      break;

bootstrap colors

I use a dark bootstrap theme. When the calendar is displayed, it uses its own css colours - which results in pretty much all white text on all white background.

Removing the colour references in the zabuto css file made it inherit all the bootstrap colours in my boostrap css, and all was good again.

Which makes me think that perhaps the default css should not have the basic background and text colours specified, the doc should be updated to tell the user which classes to override to colour in the special parts (eg the highlight and badge), and generally leave the rest to inherit from bootstrap.

How To Send Data with Ajax call

Hello , First of all Thanks to developer for this calendar , My Issue is "How to send Current Month and Year with Ajax call ?? "
My mean is suppose Today is 2017-02-16 and if we navigate back means January than with ajax send that data,
ajax: {
url: "show_data.jsp?month=xxx,year=xxx",
modal: true
}

Event functionality (in and out!)

Hi,

really impressed with your calendar - it looks great and is easy to use.

I have a couple of questions though...

I pass data in a string using the data syntax and that works fine (it's read from a database). Now I intend having a context menu appear when you click on a date and this will allow you to set individual events. As I will need to populate these back to calendar (in a single instance) and then back to the database (for all events for a complete update) - I'd really appreciate if you can tell me how to:

 --  add a single event when there are already events in the calendar I don't wish to lose
 --  retrieve all the events from the calendar (so I can pass them back to the database) 

I don't expect you to write the code by the way - some pointers of how to get at this stuff would be great though

Many thanks

TSI

drawtable before action_nav

Scenario: disable click event late of today

You cannot do it using action_nav function if you navigate to previous month and go back.
what am i doing is move the drawtable function before action_nav function.

$prevMonthNav.click(function (e) {
      drawTable($calendarElement, $tableObj, prevYear, prevMonth);
 });

if (typeof($calendarElement.data('actionNavFunction')) === 'function') {
       $prevMonthNav.click($calendarElement.data('actionNavFunction'));
 }

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.