Giter Club home page Giter Club logo

angular-bootstrap-calendar's Introduction

Angular Bootstrap Calendar

project unmaintained Gitter Build Status codecov Bower version npm version devDependency Status GitHub issues GitHub stars GitHub license

Like what you see here? Hire me! ๐Ÿ‘จโ€๐Ÿ’ป

๐Ÿšจ๐Ÿšจ๐Ÿšจ Project status ๐Ÿšจ๐Ÿšจ๐Ÿšจ

Due to the growing popularity of angular 2 and beyond, this project is considered feature complete and no further work will be done on it. All dev time is now being devoted to the projects successor angular-calendar. However, you are welcome to fork and modify this repo as you please.

Table of contents

Demo

https://mattlewis92.github.io/angular-bootstrap-calendar/

About

This plugin is an AngularJS port of the original jQuery bootstrap calendar that can be found here: http://bootstrap-calendar.azurewebsites.net/

The layout and functionality is intended to be exactly the same, but without the overhead of including jQuery just for a calendar.

All credits for the UI/UX and the less files of the calendar go to the original author.

Pull requests are welcome.

Looking for an angular 2.0+ version of this library? Check this out: https://github.com/mattlewis92/angular-calendar

Installation

The calendar has a few dependencies, these are as follows, and must be included before this libraries files:

Optional dependencies:

  • ui-bootstrap (0.14.0+, optional, include for collapse animations and tooltips.
  • interactjs (optional, include to allow drag and drop on the calendar)
  • ngTouch (optional, include if using the calendar on mobile devices. You will also need to enable $touchProvider.ngClickOverrideEnabled(true) on angular 1.5.0+)

You can install through bower:

bower install --save angular-bootstrap-calendar

You will then need to include the JS and CSS files for the plugin:

<link href="bower_components/angular-bootstrap-calendar/dist/css/angular-bootstrap-calendar.min.css" rel="stylesheet">
<script src="bower_components/angular-bootstrap-calendar/dist/js/angular-bootstrap-calendar-tpls.min.js"></script>

And finally add the module dependency in your AngularJS app (you can remove ui.bootstrap if you don't want the extra dependency - it is only required for collapse animations and tooltips):

angular.module('myApp', ['mwl.calendar', 'ui.bootstrap']);

Alternatively you can install through npm:

npm install --save angular-bootstrap-calendar

Or if using npm 3+ where peer dependencies aren't automatically installed:

npm install --save angular-bootstrap-calendar angular bootstrap moment angular-ui-bootstrap

Then add as a dependency to your app:

angular.module('myApp', [require('angular-bootstrap-calendar'), require('angular-ui-bootstrap')]);

Documentation

There is a single directive exposed to create the calendar, use it like so:

<mwl-calendar
    view="calendarView"
    view-date="viewDate"
    events="events"
    view-title="calendarTitle"
    on-event-click="eventClicked(calendarEvent)"
    on-event-times-changed="calendarEvent.startsAt = calendarNewEventStart; calendarEvent.endsAt = calendarNewEventEnd"
    cell-is-open="true">
</mwl-calendar>

An explanation of the properties is as follows:

view (required attribute)

This variable is a string that can be either year, month, week or day. Changing it will change the view of the calendar.

For the calendar to display this variable needs to be set like so:

$scope.calendarView = 'month';

view-date (required attribute)

This variable holds the current date the calendar is centralised on. Each view will decide on its current year / month / week / day depending on the value of this variable.

events (required attribute)

An array of events to display on the calendar. For example:

$scope.events = [
  {
    title: 'My event title', // The title of the event
    startsAt: new Date(2013,5,1,1), // A javascript date object for when the event starts
    endsAt: new Date(2014,8,26,15), // Optional - a javascript date object for when the event ends
    color: { // can also be calendarConfig.colorTypes.warning for shortcuts to the deprecated event types
      primary: '#e3bc08', // the primary event color (should be darker than secondary)
      secondary: '#fdf1ba' // the secondary event color (should be lighter than primary)
    },
    actions: [{ // an array of actions that will be displayed next to the event title
      label: '<i class=\'glyphicon glyphicon-pencil\'></i>', // the label of the action
      cssClass: 'edit-action', // a CSS class that will be added to the action element so you can implement custom styling
      onClick: function(args) { // the action that occurs when it is clicked. The first argument will be an object containing the parent event
        console.log('Edit event', args.calendarEvent);
      }
    }],
    draggable: true, //Allow an event to be dragged and dropped
    resizable: true, //Allow an event to be resizable
    incrementsBadgeTotal: true, //If set to false then will not count towards the badge total amount on the month and year view
    recursOn: 'year', // If set the event will recur on the given period. Valid values are year or month
    cssClass: 'a-css-class-name', //A CSS class (or more, just separate with spaces) that will be added to the event when it is displayed on each view. Useful for marking an event as selected / active etc
    allDay: false // set to true to display the event as an all day event on the day view
  }
];

title, color and startsAt are required for all events.

view-title

This variable will be assigned to the calendar title. If you want to change the formatting you can use the calendarConfig or just override the appropriate method in the calendarTitle factory.

on-event-click

This expression is called when an event is clicked on the calendar. calendarEvent can be used in the expression and contains the calendar event that was clicked on.

on-event-times-changed

This expression is called when an event is dragged and dropped or resized into a different date / time on the calendar. The available values that are passed to the expression are: calendarEvent, calendarNewEventStart, calendarNewEventEnd and calendarDraggedFromDate (month view only). The directive won't change the event object and leaves that up to you to implement. Please note drag and drop is only available by including the interactjs library.

on-timespan-click

This expression is called when a month, day or hour on the calendar is clicked on the year, month and day views respectively. calendarDate can be used in the expression and contains the start of the month, day or hour that was clicked on. If on the month or year view calendarCell will contain cell data for the clicked day or month which you can then modify.

on-date-range-select

This expression is called when a range of hours selected on the day view respectively. calendarRangeStartDate can be used in the expression and contains the start of the range, calendarRangeEndDate can be used in the expression and contains the end of the range.

cell-is-open

A 2 way bound variable that when set to true will open the year or month view cell that corresponds to the date passed to the date object passed to view-date.

day-view-start

An interpolated string in the form of hh:mm to start the day view at, e.g. setting it to 06:00 will start the day view at 6am. Any minutes must be divisible by the day-view-split value.

day-view-end

An interpolated string in the form of hh:mm to end the day view at, e.g. setting it to 22:59 will end the day view at 11pm.

day-view-split

The number of chunks to split the day view hours up into. Can be either 10, 15 or 30. Default: 30

day-view-event-chunk-size

The number of pixels to "snap" event drag and resizes to. Default: 30

day-view-segment-size

The size of each hour segment in the day view in pixels. A custom css class is also required to set the height with the same value. See the example for details. Default: 30

day-view-event-width

The width of day view events. Default: 150

on-view-change-click

An optional expression that is evaluated when the view is changed by clicking on a date. Return false from the expression function to disable the view change. calendarDate can be used in the expression and contains the date that was selected. calendarNextView is the view that the calendar will be changed to.

cell-modifier

An optional expression that is evaluated on each cell generated for the year, month and day views. calendarCell can be used in the expression and is an object containing the current cell data which you can modify (see the calendarHelper service source code or just console.log it to see what data is available). If you add the cssClass property it will be applied to the cell.

cell-auto-open-disabled

If set it true it will disable the auto opening and closing of the slidebox on the month and year views

custom-template-urls

An object where the key is the template name to override and the value is a path to a custom template for that calendar instance. If not set it will fallback to the value of calendarConfig.templates.

For example, to change the month view template on just one instance of the month view:

// in your controller
$templateCache.put('my-custom-template.html', 'Custom month view template here');

// in your template
<mwl-calendar custom-template-urls="{calendarMonthView: 'my-custom-template.html'}"></mwl-calendar>

template-scope

An object containing a set of variables that will be available in a custom template as vm.templateScope

draggable-auto-scroll

Passed to the autoScroll option of interactjs. Unlike interact this defaults to true if not set.

Configuring the calendar default config

You can easily customise the date formats and i18n strings used throughout the calendar by using the calendarConfig value. Please note that these example formats are those used by moment.js and these won't work if using angular as the date formatter. Example usage:

angular.module('myModule')
  .config(['calendarConfig', function(calendarConfig) {

    // View all available config
    console.log(calendarConfig);

    // Change the month view template globally to a custom template
    calendarConfig.templates.calendarMonthView = 'path/to/custom/template.html'; 

    // Use either moment or angular to format dates on the calendar. Default angular. Setting this will override any date formats you have already set.
    calendarConfig.dateFormatter = 'moment';

    // This will configure times on the day view to display in 24 hour format rather than the default of 12 hour
    calendarConfig.allDateFormats.moment.date.hour = 'HH:mm';

    // This will configure the day view title to be shorter
    calendarConfig.allDateFormats.moment.title.day = 'ddd D MMM';

    // This will set the week number hover label on the month view
    calendarConfig.i18nStrings.weekNumber = 'Week {week}';

    // This will display all events on a month view even if they're not in the current month. Default false.
    calendarConfig.displayAllMonthEvents = true;

    // Make the week view more like the day view, ***with the caveat that event end times are ignored***.
    calendarConfig.showTimesOnWeekView = true;

  }]);

Custom directive templates

All calendar template urls can be changed using the calendarConfig as illustrated above.

Please note that even patch releases may change templates which could break your app, so if using a custom template it is recommended that you pin the version of this module and review all changes when updating the version.

The mwl-date-modifier directive

There is also a helper directive that you can use for the next, today and previous buttons. Use it like so:

<button
  class="btn btn-primary"
  mwl-date-modifier
  date="viewDate"
  decrement="calendarView">
  Previous
</button>

<button
  class="btn btn-default"
  mwl-date-modifier
  date="viewDate"
  set-to-today>
  Today
</button>

<button
  class="btn btn-primary"
  mwl-date-modifier
  date="viewDate"
  increment="calendarView">
  Next
</button>

Internationalization and localization

You can either use angular's date filter or moment.js to format dates. The default is to use angular. You can change the formatter to be moment like so:

angular.module('myModule')
  .config(['calendarConfig', function(calendarConfig) {

    calendarConfig.dateFormatter = 'moment'; // use moment to format dates

  }]);

Then you just need to include the appropriate locale files for your app.

If you want to dynamically change the locale for angular and not include all of the available angular locale files try this library.

Otherwise if using moment you can call moment.locale('YOUR_LOCALE_STRING') to change the locale and the calendar will auto update.

To set Monday as the first day of the week, configure it in moment like so (even if using angular for formatting dates):

moment.locale('en_gb', {
  week : {
    dow : 1 // Monday is the first day of the week
  }
});

For a full list of all available formats and their defaults see calendarConfig.js

Hiding the calendar

When hiding the calendar it is recommended to use ng-if instead of ng-show/hide otherwise drag, drop, resize and date range selection will not work properly.

Development

Prepare your environment

  • Install Node.js and NPM (should come with)
  • Install local dev dependencies: npm install while current directory is this repo

Development server

Run npm start to start a development server on port 8000 with auto reload + run tests.

Testing

Run npm test to run tests once or npm run test:watch to continually run tests (this is automatic when you run npm start).

Build

Run npm run build to build the project files in the dist folder

License

The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

angular-bootstrap-calendar's People

Contributors

asurinov avatar burtek avatar bwobbones avatar chipsetsv avatar dylanwatsonsoftware avatar hitautodestruct avatar koosmann avatar krizalys avatar mattlewis92 avatar nbering avatar newmesiss avatar raphaeloneves avatar santam85 avatar thimp avatar wawyed 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  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

angular-bootstrap-calendar's Issues

configure project in one driver

I have the following questions, I am working on the basis of the code sample project, I am modifying main.js and I want to leave all the drivers view this file so set as follows

var app = angular.module('mwl.calendar', ['ui.bootstrap','firebase']).constant('moment', window.moment);

  app.controller('MainCtrl', ['$firebase' ,'$scope',
        function ($firebase,$scope, $modal, moment) {

    var currentYear = moment().year();
    var currentMonth = moment().month();

but I do not get to run the project now

image

Can't get it to work

Hi,
This seems to be the best angular based calendar to fit my need. But I'm having a trouble getting it to work. I followed exactly the instructions 3 times now and still can't get it to work. I copied all the folders and the files in them (dist, docs, src, templates) into my solution.
I wonder if you could help me out.

The initial problem I had was that it can't load the templates. So, I changed the templateUrl in angular-bootstrap-calendar.js to have the correct path. But then it doesn't show anything. I'm using latest chrome and the console doesn't show any errors. I copied and pasted the in the markup and $scope.events in the script.

I got other calendar directive to work but it's not as good as yours. So, I hope you can help me.
Thanks

ps. I'm new with posting at github. So, I'm not sure if there's a better way to communicate with you besides opening a new issue.

ISO week display bug

If calendar-use-iso-week="true" is set on the calendar directive, Sunday events are not displayed on the week view.

See: http://plnkr.co/edit/5sOEAZxzkFqLNbJUkRCD?p=preview

Notice the one event on Sunday March 29. Switch to week view and go back to that week. The event won't display. Modify the plunkr to remove the ISO week true setting, and it will then correctly display on the week view.

Make logic in the calendarHelper less convoluted

Return a flat array instead of a pre-generated grid of dates, and use limitTo and a custom offset filter to handle chunking up dates into rows for the month and year view. This would also be a good time to add unit tests.

The value passed to calendar-view is not set

Hey Matt,

I'm getting the error message "The value passed to calendar-view is not set" where the calendar should be located. Calendar-view="calendarView" in the index.html file, so I'm not sure why it is showing that error. I have tried changing it to "month" or "year" but it doesn't change anything.

If you have a fix for this I would greatly appreciate it! I can also supply more information if that is needed. Thanks!

Cannot read property 'starts_at' of null

I keep getting the error 'Cannot read property 'starts_at' of null' when i try to consume the event data from an asp.net web api 2 web service. The strange thing is that i have a 'starts_at' property in a array of json objects that are being returned.

A wish: event on click to empty days

This is not an issue but a feature-request.
Could you make day-cells without appointments clickable in month- and week-view? And then throw an event like "calendar-date-click(date)"? Maybe make empty months in year-view and hours in day-view clickable too.

A developer using your component could use this feature in two ways:

  1. Use the calendar-date-click()-event to add a new appointment => no need for a "New Appointment"-button anymore.
  2. Use the calendar-date-click()-event for actual date selection to replace components like DatePicker in some scenarios.

Greetings

View Events in Month View with just numbers

Hi I was wondering if there is way to have the events in the month view as numbers just like they are in the year view. This would be a great option since I can have like 60-80 events on a day and it would be better if the calendar would just show a number instead. Thanks.

PS Not sure if this where feature requests should go but I wasn't sure if there was anywhere else to put the request.

Externalisation of directive template

Hi,

We really like your library, so we want to propose you another enhancement.
We are working with many library like Angular-UI-Bootstrap and they provide a templateless version of the library, letting us define what html we want to use (instead of the default one).

It could be useful for fine customization or modification of behaviour strictly linked to the template (it is our case).

So, this enhancement will be just linked to the gulp build process and not strictly to the library.

Thank you

Time format attribute

Great work on this directive, really the best ng calendar out there! My users are mainly from Europe, so I like to go with 24h time rather than AM/PM.

I change this right now in the source on my local copy, but on bower update I have to do remember to repeat this. Do you have any plans for adding format attributes, like time (H:mm), date (for title use) etc.?

Thanks again for your nice work!
/dmbjsn

New Event

First of all great port. I like the ability to see a detail of the events in calendar (the pull down).
The only issue I have encountered is the creation of the new issue. Once created the dot is missing on the last day of the event (month view). It appears just after ex the end time is changed a bit.
There must a minor bug like a missing execution call or some $scope.$apply().

i18n hell

MomentJS provides bunch of useful features that any calendar would use, but once used to render SOME of final screen outputs it gets messy. In i18n environment you need an internationalization for Angular and other for MomentJS. If there is necessary to use MomentJS for calculation (I can't really tell how difficult it would be to refactor into vanilla JS) the outputs return moment(currentDay).format(...) should be return $filter('date')(currentDay,'...') to be able to handle most of the i18n issues just by using standard Angular locale file.

0 tests

Thank you to provide an alternative to angular-ui-calendar.

I have read the code and I don't have find any test.
Hey it's angular so you should provide tests with your addon !

You need to setup karma + jasmine and push all that to travis.

add Spanish language

I watched that bootstrap-calendar You can change the language, as it did this with this module?

Week view broken?

Hi,

first of all thank you for the precious work.

Then, check dates of "event 1" and it's representation. What's wrong?
As you can see an Event from 3pm to 6pm of the same day (3th or 5th March) is seen over multiple days.

2015-03-04_1541
2015-03-04_1542
2015-03-04_1542_001

how to save the events created ?

how can I and where can I save the created events. They are the standard by main.js. file How do I burn them in an xml file for example?

Render events in JSON format from an ajax request

Hi,

Thanks for this project.

Please I would like to use this calendar only to render events in JSON from an Ajax request, without displaying the events editor. Could you please guide me (if possible, without Angular, I am not using it in my project)?

Thanks
Michael

Dist css with sourceMappingURL

I have a problem with the minified.css file found in /dist/css/angular-bootstrap-calendar.min.css
This file has the line /*# sourceMappingURL=angular-bootstrap-calendar.min.css.map */
I want to use this file in my production environment, without need to edit it, but if I do it I get a 404 error, because in my server I dont want to provide the .map file.

I dont really understand why is the file angular-bootstrap-calendar.min.css.map needed. Maybe do you added it to Gulp on porpous or is it a default configuration (I'm not really familiar with Gulp)?
Maybe the css task could be just like this:

gulp.task('css', function() {

  return gulp.src('src/**/*.css')
    .pipe(gp.sourcemaps.init())
    .pipe(gp.concat('angular-bootstrap-calendar.css'))
    .pipe(gulp.dest('dist/css'))
    .pipe(gp.minifyCss())
    .pipe(gp.rename('angular-bootstrap-calendar.min.css'))
    .pipe(gulp.dest('dist/css'));

});

Configurable Event Count Badge

I have mixed feelings about the new event count badges. I generally like the idea, but in my use case it can be a big confusing. My calendar presents a list of time slots, some empty and some filled. Displaying the number in the way that this feature does is confusing for my users, and empty timeslots are included in this count. See the attached screenshot:

screenshot 2015-04-07 15 39 54

I would propose that you have at minimum an option to turn this feature off completely. Even better would be to also have a property of events that would not count that particular event in this count. Kind of an ignore flag or something.

ng-click $event shadowing?

In month view, I would like to be able to click event without triggering calendar-timespan-click function. To achieve this, I need to pass $event to my calendar-event-click function and call $event.stopPropagation().
However, ng-click $event seems to be shadowed by a calendar event from you code: ng-click="eventClick({$event: event})"> so I have to declare calendar-event-click="eventClicked($event)" and cannot pass ng-click $event.
Please correct me if I'm wrong :) Any workarounds/fixes?

populate events using angular $http

Awesome job on this. I'm new the Angular but I believe I've poked around enough to get the ajax request working that'll retrieve events from a mysql database via php script and return the events in json format. I'd appreciate a quick eye to see if this is the best way to accomplish this.

In main.js I added the following:

angular.module('mwl.calendar')
.controller('MainCtrl', function ($scope, $modal, moment,$http) {

$scope.getData = function() {
    var startDate = encodeURIComponent( moment( $scope.calendarDay ).startOf( $scope.calendarView ).toISOString() );
    var endDate = encodeURIComponent( moment( $scope.calendarDay ).endOf( $scope.calendarView ).toISOString() );
    var getURL = "getschedule1.php?starts_at=" + startDate + "&ends_at=" + endDate;
    $http.get( getURL ).success(function (data) { $scope.events = data;})
};

$scope.calendarView = 'month';
$scope.calendarDay = new Date();
$scope.getData();

}

I did something similar in the mwlcalendar.js file:

controller: function($scope, $timeout, $locale, moment, $http) {

    $scope.control.prev = function() {
      $scope.currentDay = moment($scope.currentDay).subtract(1, $scope.view).toDate();
      $scope.control.getData();
    };

    $scope.control.next = function() {
      $scope.currentDay = moment($scope.currentDay).add(1, $scope.view).toDate();
      $scope.control.getData();
    };

    $scope.control.getData = function() {

        var startDate = encodeURIComponent( moment( $scope.currentDay ).startOf( $scope.view ).toISOString() );
        var endDate = encodeURIComponent( moment( $scope.currentDay ).endOf( $scope.view ).toISOString() );

        var getURL = "getschedule1.php?starts_at=" + startDate + "&ends_at=" + endDate;

        $http.get( getURL ).success(function (data) { $scope.events = data;})

    }

}

..the idea being that on first load, I would make an ajax call using the first day of the month and grab all events for that month. If the end user clicks PREV or NEXT it would make ajax calls again grabbing the corresponding events. I am still trying to figure out how to do this for the Month, Day, Week, Year .. but I'll get to that.

Lastly, is there a way to hide the Editor? I am having my end users login and depending on their access I want to allow/revoke access to the Editor portion.

Any guidance would be greatly appreciated!

Thanks again.

Calendar not showing

Hi!

I'm trying to use the calendar with the framework Codeigniter, I've used the code in the demo but I can't get it to work.
Could you please guide me with this?

screenshot 14

Problem of Monday Event in Week View

If we use the week view, some event, seems those who are attached to the Monday are not shown in the correct Week. They appear in the previous week on Sunday...

I've reproduced it on library example from github with just one event, you can see it on the screenshot.

image

If you need more info to reproduce it, let me know.

Thanks

Big amount of events make it slow

I have tried angular-bootstrap-calendar, it looked awesome in the demo, but when I have implemented it in my application I realize it got terrible slow when I have a big amount of events. For example, over 100 events I feel some seconds of delay when switching from year to month calendar, and over 300 events the browser says the script stops responding.
Maybe I have done something wrong in my implementation, but I've added 20 events into the live demo (http://mattlewis92.github.io/angular-bootstrap-calendar/) and I already fill some miliseconds of delay between switching.

The problem seems to occur during updateView() function.

Day start and end times

The jQuery plugin has an option for setting the start time and end time. Any plans to support all hours in a day? Thanks!

example
example

Hour-list as sidebar in week-view

Would it be possible to get a list of hours in the sidebar like the image? Also, clicking an empty cell would pass an object to the controller with date, start and end hour. What do you think?

I would of course love to contribute but this is just way over my head, skill wise.

skjermbilde 2014-11-10 kl 20 58 59

Problem after remove ui.bootstrap with tooltips and hide event colapse box

After the release 0.8.0 ui.bootstrap was not loaded anymore from mwl.calendar (the dependency was removed with 57a9e13), so tooltips were not working.

I think it would be nice to add at the end of the Installation section in readme.md something like the following:

Remember to include ui.bootstrap if you want to use collapse animations and tooltips on the year and month views:

angular.module('myModule', ['mwl.calendar', 'ui.bootstrap']);

I have also notice that while tooltips where not working, because I didnt include ui.bootstrap, the colapse box was being hid when I place the mouse over the event dot (usualy should appear the tooltip there). I think this is very anoying from usability perspective, because you get UI element away without knowing why (this also hapend if the tooltip appears but in that case is not so anoying because a new UI element apperar, but I dont like any of this 2 auto-hide). I explain better how to get this problem:

  1. Go to the demo (http://mattlewis92.github.io/angular-bootstrap-calendar/)
  2. Click on the red badge of one day, so the colapse box appears with the event in that day
  3. Move the mouse over any blue circle of the events in any day of the calendar (this will display a tooltip with the title of the event and close the colapse box)
    Even if the tooltip does not appear because we didnt include ui.bootstrap, the colapse box is hidden (with no reason in my opinion)

Also if you move the mouse very fast from and it goes over any circle the tooltip does not appear because the mouse was not enought time over the circle but the colapse box is hidden.

Request: Move month view's events-list div into separate template

Would it be possible for you to move the events-list div in the month.html template into a separate template to be easily overridden? It'd allow for easier modifications to how events are displayed in their current circle+tooltip form. For example, directly displaying the event titles on the calendar for all dates with < X events on any given day.

using /Templates directory for templates

Hi,

Is there a way to use the /templates directory templates instead of lines 16-20 for the week, month, year templates from angular-bootstrap-calendar-tpls.js? I'm sure there is, and I'm sure it has to do with angular-bootstrap-calendar.js, but I just really don't get how to do it.

I've very new to angular; it's probably just something I've missed.

It's a nice looking little package, though, and I'm really enjoying digging into it!

unable to disable drilldown

This may be way out of scope for your project, but is there any way to disable the drillDown function for a specific date? For example, I want to show a month view where certain days are disabled. I can write my own calendar-timespan-click function to do this, but it gets preceded by the drillDown function when the user clicks on the day number.

I can work on a pull request for this; would you be more likely to accept one where the drillDown can be disabled as an attribute on the directive or by having the drillDown function run the timespan click first? (which could return false/stop propagation right?)

Parameterized View Templates

I appreciate that the calendar is a complete eco-system, and I think it's likely the best one out there in terms of matching my desired end user experience, however, some of the view templates are a bit opinionated (in particular the month sliding-drawer effect). I forked this codebase and began some rough / early work toward making the parent directive capable of accepting attribute parameters for alternate views but it's tough to pull parameters from parents inside of the child directive's templateUrl: function() {}. I was trying to avoid a major rewrite of the code that would likely be rejected so I'm opening it up here as a talking point. Any thoughts?

Time_split in day view.

This is a good plugin of bootstrap-calender by Serhioromano.

In bootstrap-calendar, it having time_split option for day view.
Hence, if we want to display day with some minute interval, then how to configure it??

Drilldown causing problems

Hello, I have a web app with multiple modules. "mwl.calendar" is injected into the main module.

var app = angular.module('main', ['mwl.calendar', 'ui.bootstrap', 'EventCtrl']);
angular.module('EventCtrl', []).controller('EventController', EventController);

I'm using your calendar in a EventCtrl module. I'm having trouble with the calendar when drillDown is triggered.

If I trigger drillDown, the calendarView doesn't get updated anymore with the toggle controls.

I suspect it is a scope issue but I'm not sure.

locale bug when edit events

Hello. Great plugin. Just tested it.
I have integrated angular-i18n for my locale and moment.js too.
The calendar works great, in my language with my locale strings and the weekly days begins with "Monday".

But in "Edit events" tab, StartsAt and EndsAt show me something like "Wed Mar 25 2015 08:30:00 GMT+0200 (EET)". When I change date from calendar view and click on some date - this field will show me the right locale date (for my language), but when click on some buttons (when changing time, for example) the wrong date (english format) appears again.
Another bug is that when calendar-picker displays the first weekly day is "Sunday" (translated in my language, that is good), but must be "Monday" (as it in first big calendar).

I don't know if these bugs comes from this plugin or maybe I do something wrong.

Incorrect cal-day-weekend logic

If moment locale's week.dow is not set to 1 (Monday as first day of week), then the logic that applies the 'cal-day-weekend' class in the week and month views incorrectly marks non Saturday/Sunday days as the weekend. See your demo for an example, where Friday and Saturday are colored red.

Request: Add day of month to events in year view

When a month is selected on the year view, it shows all the events for it. However, there's no way to know what days of the month they're on unless you switch views. I think preceding the event's title with the day of the month would improve usability.

not respecting curent monent locale

when moment.locale(key) called, with dow and doy set, the calendar event after mont or day view rendered anew

dow and doy is not respected

integrate the add button caendario

may ud can integrate a button to add an activity directly from the calendar?
or could tell me how to perform this integration , Greetings

image

Different color for the current hour / day / month...

Hi,

First, you made a very great work with this port, very helpful on our project.

I propose an UI enhancement, to change the color of the current Hour / Day / Mont (for the different view) , it will help the end-user to find where he is when he sees all the events on the calendar.

Thank you again for your work.

The value passed to the calendar-view is not set

Hey I have created a controller named DateCtrl(date.js) + date.html

In date.js >>

screen shot 2015-03-20 at 12 03 52 pm

In date.html >>

screen shot 2015-03-20 at 12 05 02 pm

This is how the rendered page looks like >>

screen shot 2015-03-20 at 12 02 31 pm

Please help.. This might be the wrong place to post but i cudn't find any.

Sliding panel does not close properly

If I try to insert a new event, sliding panel is opened, I click on edit icon and appears a modal. After closing modal if I try to click on other date, without closing sliding panel, the sliding panel does not close properly. I would expect that the panel would be closed automatically.

I'm on chrome.

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.