Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
angular-addtocalendar
Advanced tools
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!
Add source
bower:
bower install angular-addtocalendar --save
npm:
npm i angular-addtocalendar --save
If you're using webpack, you need to require the module.
require('angular-addtocalendar');
Alternatively:
import 'angular-addtocalendar';
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
.
For a demo, please click here.
<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>
Attribute | Description | Format | Example | Required |
---|---|---|---|---|
title | Name of the event. | String | Fourth of July Fireworks | Yes |
description | Description of the event. | String, defaults to empty | Celebrate the independence of the United States with fireworks in one of the greatest cities in the world. | No |
location | Location of the event. | Plain text | Battery Park City, New York, NY | Yes |
start-date | The timestamp of when the event begins. | Date string. Should match format of end-date or format . | July 4 2017 7:00 PM UTC+500 | Yes |
end-date | The timestamp of when the event ends. | Date string. Should match format of start-date or format . | July 4 2017 10:00 PM UTC+500 | Yes |
format | The 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 Z | No |
timezone | Any valid momentjs UTC offset | Moment | America/New_York | No |
class-name | The desired class for the dropdown. See Custom Styling. | Bootstrap class/plain text. Default btn btn-sm btn-default dropdown-toggle | btn btn-sm btn-default dropdown-toggle | No |
btn-text | Text for the button to display | Plain text. Default Add to calendar | Add to calendar | No |
use-bootstrap | Whether to use Bootstrap styling. | Boolean. Default: false | null | No |
hover-text | Text to use as the title of the element. | String Default: value of title attribute | Add to calendar | No |
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.
If you already have Bootstrap set up in your project, just pass in use-bootstrap="true"
as a parameter to the <angular-addtocalendar />
component.
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" />
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.
The css namespace (parent class) for this module is atc-btn-group
(assuming use-bootstrap
is false).
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 Explorer | 9.0+ |
Edge | Yes |
Safari | ≤ 6 |
Firefox | 20.0+ |
Opera | 15.0+ |
Chrome | 14.0+ |
Android | 4.4+ |
Please report all bugs here.
Available here.
FAQs
AngularJS directive for adding events to calendar apps
We found that angular-addtocalendar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.