npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

angular-ios-calendar

v0.0.1

Published

Calendar similar to the one found in ios7 as an AngularJs directive

Downloads

6

Readme

angular-ios-calendar

An iOS 7 style calendar, exposed as an AngularJs directive.

Usage

In the root of your AngularJs project, run the following command:

bower install --save angular-ios-calendar

In your application Javascript, find where you instantiate your AngularJs app, and add this package as a dependency:

angular.module('myapp', [
    'bguiz.angular.ioscalendar' // add this line
])
.config( /* ... */ );

Anywhere in your application templates, add the directive to your markup:

<angular-calendar>
</angular-calendar>

Scope parameters

This is the isolate scope definition of the directive:

scope: {
    events: '=',
    selectDate: '&',
}

As such, you may pass in an events variable, and a selectDate function, like so:

<angular-calendar
    events="ctrl.events"
    select-date="ctrl.selectDate(date)">
</angular-calendar>
  • events:
    • Expects an array of objects
    • Each object contains a key, start, which should be a valid moment
  • selectDate:
    • Expects a callback function
    • The function should accept a single parameters, named date, which should be a valid moment
    • This callback function will be invoked whenever the user selects a different date on the calendar
      • This is the primary means of communication between the calendar directive and the context in which it is used

Troubleshooting

  • moment

    • This project does not include momentjs as a dependency itself
    • It expects the application project to include momentjs instead
    • Run bower install --save momentjs in the root folder of your application
  • HTML

    • If the calendar directive does not render at all:
      • Check the console output in your browser to ensure that calendar.html is found correctly
    • Ensure that the build step for your main app incorporates calendar.html into its final build

e.g. If you are using gulp, in gulpfile.js:

Change this:

gulp.src([
    './src/app/**/*.html',
    '!./src/app/index.html',
])

To this:

gulp.src([
    './src/app/**/*.html',
    // './bower_components/**/*.html', //This line adds HTML files from all bower components
    './bower_components/angular-ios-calendar/*.html', //This line is specific to HTML files from this package
    '!./src/app/index.html',
])
  • CSS
    • If the calendar directive renders, but all CSS styles are missing:
      • Check the console output in your browser to ensure that calendar.scss is found and pre-processed
    • Ensure that thebuild step for your main app incorporates calendar.css into its final build

e.g. If you are using gulp.js, in gulpfile.js

Change this:

gulp.src([
    './src/app/**/*.scss',
    '!./src/app/**/_*.scss'
  ])

To this:

gulp.src([
    './src/app/**/*.scss',
    '!./src/app/**/_*.scss',
    // './bower_components/**/*.scss', //These lines add SCSS files from all bower components
    // '!./bower_components/**/_*.scss'
    './bower_components/**/*.scss',  //These lines are specific to SCSS files from this package
    '!./bower_components/**/_*.scss'
  ])

Roadmap

  • [ ] Currently, calendar only indicates which days have events
    • Display individual events

License

GPLv3