Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-addtocalendar

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-addtocalendar

AngularJS directive for adding events to calendar apps

  • 1.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
125
decreased by-19.87%
Maintainers
1
Weekly downloads
 
Created
Source

angular-addtocalendar

v1.3.1

An AngularJS directive for adding an event to calendar apps. It supports .ics files for iCalendar and Outlook and also supports Google Calendar, Yahoo! Calendar and Microsoft Calendar.

Enjoy!

Coverage Status Build Status npm version License

dependency Status devDependency Status

Installation

  1. Add source

    bower:

    bower install angular-addtocalendar --save
    

    npm:

    npm i angular-addtocalendar --save
    
  2. If you're using webpack, you need to require the module.

    require('angular-addtocalendar');
    

    Alternatively:

    import 'angular-addtocalendar';
    
  3. Inject the dependency angular-atc into your app:

    angular
      .module('myApp', [
        'angular-atc',
        ...
      ]);
    

    Note: If you're using a version earlier than 1.3.0, the module name is jshor.angular-addtocalendar.

Demo

For a demo, please click here.

Example

<addtocalendar
    start-date="20150704T190000"
    end-date="20150704T210000"
    title="Fourth of July Fireworks"
    location="Battery Park City, New York, NY"
    class-name="btn btn-sm btn-default dropdown-toggle"
    description="Celebrate the independence of the United States with fireworks in one of the greatest cities in the world.">
</addtocalendar>

Attributes

AttributeDescriptionFormatExampleRequired
titleName of the event.StringFourth of July FireworksYes
descriptionDescription of the event.String, defaults to emptyCelebrate the independence of the United States with fireworks in one of the greatest cities in the world.No
locationLocation of the event.Plain textBattery Park City, New York, NYYes
start-dateThe timestamp of when the event begins.Date string. Should match format of end-date or format.July 4 2017 7:00 PM UTC+500Yes
end-dateThe timestamp of when the event ends.Date string. Should match format of start-date or format.July 4 2017 10:00 PM UTC+500Yes
formatThe format that the start-date and end-date are in. May include timezone.mm/dd/yyyy hh:mm:ss Z`MMMM d YYYY h:m A ZNo
timezoneAny valid momentjs UTC offsetMomentAmerica/New_YorkNo
class-nameThe desired class for the dropdown. See Custom Styling.Bootstrap class/plain text. Default btn btn-sm btn-default dropdown-togglebtn btn-sm btn-default dropdown-toggleNo
btn-textText for the button to displayPlain text. Default Add to calendarAdd to calendarNo
use-bootstrapWhether to use Bootstrap styling.Boolean. Default: falsenullNo
hover-textText to use as the title of the element.String Default: value of title attributeAdd to calendarNo

Custom Styling

angular-addtocalendar is designed to be compatible Bootstrap but also comes bundled with both a custom stylesheet and extendable Sass styles. The markup selector convention is identical to the Bootstrap dropdown markup.

Using Bootstrap

If you already have Bootstrap set up in your project, just pass in use-bootstrap="true" as a parameter to the <angular-addtocalendar /> component.

Using the default styling

If you're using Sass, you can import the default Sass stylesheet like so:

@import '~/angular-addtocalendar/addtocalendar.scss';

Or if you want to reference the compiled stylesheet directly:

<link rel="stylesheet" href="node_modules/angular-addtocalendar/styles.css" />

Extending the existing styles

Assuming you're using Sass, import the stylesheet as noted above. Otherwise, copy the compiled CSS bundled with the project and modify styles as such.

Namespacing

The css namespace (parent class) for this module is atc-btn-group (assuming use-bootstrap is false).

Browser Support

All browsers support adding to Yahoo!, Microsoft, and Google calendars. Below is the current support for downloading .ics files for Outlook and iCalendar.

Browser.ics Support
Internet Explorer9.0+
EdgeYes
Safari≤ 6
Firefox20.0+
Opera15.0+
Chrome14.0+
Android4.4+
  • iCalendar (ironically) and Outlook do not work due to a well-known file saving bug in Safari versions > 6.

Bugs

Please report all bugs here.

Changelog

Available here.

Keywords

FAQs

Package last updated on 24 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc