Giter Site home page Giter Site logo

altinselimi / kalendar Goto Github PK

View Code? Open in Web Editor NEW
288.0 16.0 61.0 1.59 MB

Full featured, responsive, lightweight calendar in the browser.

Home Page: http://kalendar.altinselimi.com

License: GNU General Public License v3.0

JavaScript 18.96% Vue 74.02% HTML 0.52% SCSS 6.50%
calendar kalendar-vue vue kalendar full-calendar

kalendar's People

Contributors

altin-selimi avatar altinselimi avatar andrewhl avatar dependabot[bot] avatar dreglad avatar itsrawiththeh avatar magarrent avatar mserralta avatar tomscytale avatar wangqiang0121 avatar xlcrr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kalendar's Issues

Disabling hours

Hello, how can I disable hours in the table? I just want to customize kalendar so I can assign some appointments for a whole day omitting hours. Thank you!

Set start-date

Hi, I am unsure whether or not this is possible yet, but something like the ability to always have today's date as the left-most date and only see forwards in the calendar.

Cheers

Changing the cell height breaks the hour indicator

When changing the cell height, the hour indicator does not scale accordingly, resulting in an incorrect position of the indicator. This also affects the scrollToNow, as this function focusses on the hour indicator.

Attached is a screenshot with this issue. At the time of the screenschot it is 14:25, while the hour indicator shows it's about 20:45.

image

Start week on monday

Hi, is it possible to start the week on monday, it's the customary way to display a calendar in Europe.

Cheers

Add start_hour/end_hour support

The day view is always from 0 a.m. to 11 p.m. which is not always convenience, because we merely add event in the very early morning or too late in the night.
So I add start_hour/end_hour support to customize this behavior like the following snapshot.

image

click event

hi how to handle the click on the event ?( for editing or delete it ) i tried to add @click to details-card but it will not be fired

Event cards are blank

I have set up a simple project and am pulling data from Google Calendar and passing it to Kalendar.

Kalendar creates event cards in the right places on the calendar but they are all blank. See attached image.
kalendar-empty-events

<template>
  <Kalendar :configuration="calendar_settings" :events="events" />
</template>

<script>
import Vue from 'vue';
import PortalVue from 'portal-vue';
import {Kalendar} from 'kalendar-vue';
Vue.use(PortalVue);

export default {
  name: 'Calendar',
  components: {
    Kalendar,
  },
  data: () => ({
    calendar_settings: {
      day_starts_at: 7,
      cell_height: 10,
      scrollToNow: true,
      read_only: false,
      past_event_creation: false
    },
   events: [
          {
      summary: 'B in M ๐ŸŽค',
      start: { dateTime: '2020-03-18T18:00:00Z', timeZone: 'Europe/Dublin' },
      end: { dateTime: '2020-03-18T19:00:00Z', timeZone: 'Europe/Dublin' },
    },
    {
      summary: 'O & F ๐ŸŽค',
      start: { dateTime: '2020-03-18T19:00:00Z', timeZone: 'Europe/Dublin' },
      end: { dateTime: '2020-03-18T21:00:00Z', timeZone: 'Europe/Dublin' },
    },
    ...  // many more
     ]
  }),

enhancement "requests"

Hi, this looks like an amazing lib that I'll probably end up using, just have 2 things that would be cool if they could be implemented in the future, maybe in that rewrite you're doing right now, there's no hurry as I'm in early dev-stage of my project right now

1: on the week/day views (side note: why is the config for week view 'month'?) would it be possible to have a date/week-picker to select the current range in addition to the navigation arrows?

2: would it at all be possible to implement events that can cross over midnight? currently you have a start and end time and a date property, the project I'm working out is going to be used in multiple timezones, so even when someone creates an event from 4pm till 10pm american time, that would be a '2 date event' when converted to a european timezone

Not able to add kalendar-vue dependency (dependencies were not found)

Created a new project cal with vue cli 3.0.0

vue create cal
npm install --save kalendar-vue

then in HelloWorld.vue added the following:

import { Kalendar } from 'kalendar-vue';
import 'kalendar-vue/dist/kalendar-vue.css';

It gave me the following error:

ERROR Failed to compile with 2 errors 08:35:51

These dependencies were not found:

  • kalendar-vue in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HelloWorld.vue?vue&type=script&lang=js&
  • kalendar-vue/dist/kalendar-vue.css in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HelloWorld.vue?vue&type=script&lang=js&

To install them, you can run: npm install --save kalendar-vue kalendar-vue/dist/kalendar-vue.css

Split current day from configuration

Split current_day from configuration and provide it as a separate prop. In the same time remove the need for .sync modifier on kalendar props.

Import CSS throws not found error

When doing this step,
import 'kalendar-vue/dist/KalendarVue.css';

I get the error
Module not found: Error: Can't resolve 'kalendar-vue/dist/kalendar-vue.css' in '/home/projectname/projectname/components'

Is there another way to import them, or should I just download the CSS?

Also, when using <kalendar :configuration="calendar_settings" :appointments="appointments"/>, is this all you need in the HTML part to make it render the calendar, or do you have to provide the full scoped slots stuff too?

Thanks.

Change period shown in day view

Hi Altin,

I would like to make a change to the day view that it is possible to limit the period of the day that is displayed. Now it displays the full day. I would like to limit it to a specific period, i.e. business hours (8:00-17:00).

Can you please provide me with guidance how to best approach this change?

Regards, Stephen

How to do new events Hourly?

Hey, when you select the hours for doing an event, you can choose with 10 min range, what if I only want hourly or 30 minutes rang?

missing modules

I'm using vue as frontend with meteor and get this error after install npm i kalendar-vue -S:

"If you notice problems related to these missing modules, consider running:
meteor npm install --save kalendar-vue" over and over again

any suggestions ???

Mobile view?

Awesome component.

But i found a mobile view, checking on some mobile app agent. If we check the mobile views of the day there is no reason to check things like that. Maybe a media query to check the width of the browser. But i would prefer not to check those, Phones and tablets are wider than most modern desktops when checking.
https://www.w3schools.com/howto/howto_js_media_queries.asp

I just remove the media is mobile check in the element and everything worked better, maybe a touch drag in sync with the mouse down check to add.

When you add a overflow hidden on the .day-indicator class it still fits as it should :)

.day-indicator {
    padding-left: 5px;
    overflow: hidden;
    @media only screen and (min-width: 600px) {
        padding-left: 16px;
     }
}

Also would like to help. Don't know what the status is of the new developments. But if you know, please let us know here. Would like a nice standalone calendar for vue ๐Ÿ‘

Overlapping events

Hi Altin,

Excellent component! Really impressed.

I would like to make an enhancement and need your guidance where to start. The current implementation does not position events correctly if they overlap. They are positioned directly over each other. It would be if they would be positioned next to each other. In other words, that there width would be halved. If you would like to test this you can add the following events to the codepen you provide.

  {
    from: "Tue Nov 05 2018 01:00:00",
    to: "Tue Nov 05 2018 03:00:00",
    date: "2018-11-05",
    data: {
      title: "My Birthday",
      description: "Lorem ipsum dolor sit amet."
    }
  },
  {
    from: "Tue Nov 05 2018 02:00:00",
    to: "Tue Nov 05 2018 04:00:00",
    date: "2018-11-05",
    data: {
      title: "My Birthday",
      description: "Lorem ipsum dolor sit amet."
    }
  }

To better see the result switch to day view.

An additional problem I have noticed that it is not possible to create an overlapping event. The schedule is not clickable.

Regards, nidkil

crypto.getRandomValues doesnt work on IE11

For IE11
the use of crypto as a global variable doesnt work on IE11 as crypto exists not as window.crypto but as window.msCrypto.

this can be fixed by adding const crypto = window.crypto || window.msCrypto; to kalendar-container and kalendar-cell.

Note, that if later adding type definitions or for users using typescript, the msCrypto would have to be added

declare global {
  interface Window{
    msCrypto: Crypto;
  }
}

Other options could be using non mscrypto polyfills such as https://github.com/gaswelder/window-crypto

adjusting split_value responsively

Hi, I was wondering if I can upgrade the way split_value is handled recently.

Right now, in order to avoid problems in displaying appointments in my Calendar,
split_value is always equal to the greatest common divisor between my appointments durations.

Meaning if I have appointments with duration 15 min and another one with duration 20 min, split_value will equal 5 so all the appointments can be displayed without any error.

But this calculation is done globally among all my appointments, if I have 200 appointments with a duration of 20 minutes and 1 old appointment with a duration of 15 minutes, the split_value will still be 5, and it will be displayed like this for every day and every week shown in the calendar.

One way to enhance this that would be to calculate the geatest common divisor, not on all the appointments, but only on those that are displayed to the user. Thus the split_value would be calculated reactively to always match the greatest common divisor of the appointments displayed.

I saw that the component kalendar-week-view contains a computed property witch contains only the appointments displayed. Would it be possible to pass it via scoped-slots or events to parent component that contains the kalendar ?

I also saw that every time we change the week-view, there is a change event that is emitted. If the value of the dates that are displayed could be passed in this event, this could also be a way to retrieve info about dates that are actually displayed. So we can then calculate and optimise the split_value to be the greatest common divisor among the appointments that are showned.

BR

Kalendar + Firebase database

Hi everyone,

Ive 2 issues using this module with my firebase database.

First, the div "details-card" isn't being taken into account when im pulling appointments from my firebase database.

As you can see on the screenshot, appointments are being display, but when i'm using the following code in order to control what's inside the appointments blue rectangles, nothing is being display.

capture d ecran 2018-08-20 a 12 19 41

<div id='slot' slot="details-card" slot-scope="{appointment_props}">
            {{appointment_props.start_value.value | moment("add", "8 hours","hh:mm a")}} to 
             {{appointment_props.end_value.value | moment("add", "8 hours","hh:mm a")}}
 </div>

My second issue is that i want to be able to update or remove appointments when user clicks on them. It is related to the first issue obviously but its also related to the css of kalendar which indicated a "pointer-event:none" on the details-card.

Thanks very much in advance.

Event time not positioned correctly

Hi Altin,

I have noticed that the event time is not positioned correctly. It falls outside the event area. You can test this with the codepen you provide using the following event.

  {
    from: "Tue Nov 05 2018 02:00:00",
    to: "Tue Nov 05 2018 04:00:00",
    date: "2018-11-05",
    data: {
      title: "My Birthday",
      description: "Lorem ipsum dolor sit amet."
    }
  }

The fix is pretty straight forward, changing the .existing-event .time from 12px to 50px. See below.

.existing-event .time {
    right: 50px;
}

Regards, nidkil

Navigation to Next or Previous Week Slow

Sweet library! @altinselimi

One issue I noticed is that the navigation between weeks is really slow when I added to my project. It takes about 4-7 seconds to load the next week, no existing appointments. Initial load of the component is quick. Everything else seems to work fine. No console errors.

Any idea what might be causing this? Navigation throughout my project is fast. Just this component.

scss is not scoped

The scss is not scoped, causing problems with styling when embedding Kalendar in a website.

normalizeDate

Hi!

I`m trying to use this compoment.
I already followed this repo tutorial and the codepen example. But i getting these errors:

Failed to resolve filter: normalizeDate

vue.esm.js?efeb:571 [Vue warn]: Unknown custom element: <portal> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

---> <Kalendar> at kalendar-container.vue
       <Agenda> at src\components\agenda\Agenda.vue
         <VuesticLayout> at src\vuestic-theme\vuestic-components\vuestic-layout\VuesticLayout.vue
           <AppLayout> at src\components\admin\AppLayout.vue
             <App> at src\App.vue
               <Root>

Is there something i'm forgeting to add to my app?

Thanks in advance.

Only events with start end time equal to the full hour supported

Hi Altin,

I ran into a problem that events that do not start or end on the full hour throw an error (Uncaught TypeError: r.getHours is not a function). The problem seems to be the following line in kalendar-container.vue.

let start_is_midnight = from.getHours() + from.getMinutes() === 0;

In the codepen you provide you can test this with the following event.

  {
    from: "Tue Nov 05 2018 01:00:00",
    to: "Tue Nov 05 2018 02:30:00",
    date: "2018-11-05",
    data: {
      title: "My Birthday",
      description: "Lorem ipsum dolor sit amet."
    }
  }

Regards, nidkil

"TypeError: from.getHours is not a function"

image

I don't know why it's crashing all time!

app.js:8368 [Vue warn]: Error in callback for watcher "appointments": "TypeError: from.getHours is not a function"

found in

---> <Kalendar> at kalendar-container.vue

range dates view

amazing design and functionalties.

I would like to know if i can change the range of hour of my calendar like from 8A.M. to 6P.M.

range date

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.