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

ion2-calendar

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ion2-calendar - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

2

dist/components/calendar.component.js

@@ -235,3 +235,3 @@ import { Component, Input, Output, EventEmitter, forwardRef } from '@angular/core';

CalendarComponent.prototype._monthFormat = function (date) {
return moment(date).format('MMM YYYY');
return moment(date).format(this._d.monthFormat);
};

@@ -238,0 +238,0 @@ CalendarComponent.decorators = [

@@ -163,3 +163,3 @@ import { Component, ViewChild, ElementRef, ChangeDetectorRef, Renderer } from '@angular/core';

CalendarModal.prototype._monthFormat = function (date) {
return moment(date).format('MMM YYYY');
return moment(date).format(this._d.monthFormat);
};

@@ -166,0 +166,0 @@ CalendarModal.decorators = [

@@ -11,3 +11,3 @@ import { Injectable } from '@angular/core';

var _daysConfig = [];
var _a = calendarOptions || {}, _b = _a.from, from = _b === void 0 ? new Date() : _b, _c = _a.to, to = _c === void 0 ? 0 : _c, _d = _a.weekStart, weekStart = _d === void 0 ? 0 : _d, _e = _a.step, step = _e === void 0 ? 3 : _e, _f = _a.id, id = _f === void 0 ? '' : _f, _g = _a.cssClass, cssClass = _g === void 0 ? '' : _g, _h = _a.closeLabel, closeLabel = _h === void 0 ? 'CANCEL' : _h, _j = _a.doneLabel, doneLabel = _j === void 0 ? 'DONE' : _j, _k = _a.monthFormat, monthFormat = _k === void 0 ? 'MMM yyyy' : _k, _l = _a.title, title = _l === void 0 ? 'CALENDAR' : _l, _m = _a.defaultTitle, defaultTitle = _m === void 0 ? '' : _m, _o = _a.defaultSubtitle, defaultSubtitle = _o === void 0 ? '' : _o, _p = _a.autoDone, autoDone = _p === void 0 ? false : _p, _q = _a.canBackwardsSelected, canBackwardsSelected = _q === void 0 ? false : _q, _r = _a.closeIcon, closeIcon = _r === void 0 ? false : _r, _s = _a.doneIcon, doneIcon = _s === void 0 ? false : _s, _t = _a.showYearPicker, showYearPicker = _t === void 0 ? false : _t, _u = _a.isSaveHistory, isSaveHistory = _u === void 0 ? false : _u, _v = _a.pickMode, pickMode = _v === void 0 ? pickModes.SINGLE : _v, _w = _a.color, color = _w === void 0 ? defaults.COLOR : _w, _x = _a.weekdays, weekdays = _x === void 0 ? defaults.WEEKS_FORMAT : _x, _y = _a.daysConfig, daysConfig = _y === void 0 ? _daysConfig : _y, _z = _a.disableWeeks, disableWeeks = _z === void 0 ? _disableWeeks : _z;
var _a = calendarOptions || {}, _b = _a.from, from = _b === void 0 ? new Date() : _b, _c = _a.to, to = _c === void 0 ? 0 : _c, _d = _a.weekStart, weekStart = _d === void 0 ? 0 : _d, _e = _a.step, step = _e === void 0 ? 3 : _e, _f = _a.id, id = _f === void 0 ? '' : _f, _g = _a.cssClass, cssClass = _g === void 0 ? '' : _g, _h = _a.closeLabel, closeLabel = _h === void 0 ? 'CANCEL' : _h, _j = _a.doneLabel, doneLabel = _j === void 0 ? 'DONE' : _j, _k = _a.monthFormat, monthFormat = _k === void 0 ? 'MMM YYYY' : _k, _l = _a.title, title = _l === void 0 ? 'CALENDAR' : _l, _m = _a.defaultTitle, defaultTitle = _m === void 0 ? '' : _m, _o = _a.defaultSubtitle, defaultSubtitle = _o === void 0 ? '' : _o, _p = _a.autoDone, autoDone = _p === void 0 ? false : _p, _q = _a.canBackwardsSelected, canBackwardsSelected = _q === void 0 ? false : _q, _r = _a.closeIcon, closeIcon = _r === void 0 ? false : _r, _s = _a.doneIcon, doneIcon = _s === void 0 ? false : _s, _t = _a.showYearPicker, showYearPicker = _t === void 0 ? false : _t, _u = _a.isSaveHistory, isSaveHistory = _u === void 0 ? false : _u, _v = _a.pickMode, pickMode = _v === void 0 ? pickModes.SINGLE : _v, _w = _a.color, color = _w === void 0 ? defaults.COLOR : _w, _x = _a.weekdays, weekdays = _x === void 0 ? defaults.WEEKS_FORMAT : _x, _y = _a.daysConfig, daysConfig = _y === void 0 ? _daysConfig : _y, _z = _a.disableWeeks, disableWeeks = _z === void 0 ? _disableWeeks : _z;
return {

@@ -14,0 +14,0 @@ id: id,

{
"name": "ion2-calendar",
"version": "2.1.0",
"version": "2.1.1",
"description": "A date picker component for ionic2 ",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -10,2 +10,6 @@ # 📅 ion2-calendar

<p align="center">
<img width="800" src="https://github.com/HsuanXyz/hsuanxyz.github.io/blob/master/assets/ion2-calendar/calendar-1.png?raw=true">
</p>
- 支持日期范围

@@ -171,3 +175,3 @@ - 支持多选

| disableWeeks | Array<number> | `[]` | 按周数禁用 (0-6) |
| monthFormat | string | `'MMM yyyy'` | 标题格式 |
| monthFormat | string | `'MMM YYYY'` | 标题格式 |
| weekdays | Array<string> | `['S', 'M', 'T', 'W', 'T', 'F', 'S']` | 每周显示文本 |

@@ -286,6 +290,20 @@ | weekStart | number | `0` (0 or 1) | 每周从星期几开始 |

你的根模块
```typescript
import { NgModule, LOCALE_ID } from '@angular/core';
...
@NgModule({
...
providers: [{ provide: LOCALE_ID, useValue: "zh-CN" }]
})
...
```
```typescript
openCalendar() {
const options: CalendarModalOptions = {
monthFormat: 'yyyy 年 MM 月 ',
monthFormat: 'YYYY 年 MM 月 ',
weekdays: ['天', '一', '二', '三', '四', '五', '六'],

@@ -365,3 +383,3 @@ weekStart: 1,

| doneIcon | boolean | `false` | 使用完成图标按钮 |
| monthFormat | string | `'MMM yyyy'` | 月份显示格式 |
| monthFormat | string | `'MMM YYYY'` | 月份显示格式 |
| weekdays | Array<string> | `['S', 'M', 'T', 'W', 'T', 'F', 'S']` | 星期标题 |

@@ -368,0 +386,0 @@ | weekStart | number | `0` (0 or 1) | 设置每周开始时间 |

@@ -10,2 +10,5 @@ # 📅 ion2-calendar

![date](https://github.com/HsuanXyz/hsuanxyz.github.io/blob/master/assets/ion2-calendar/calendar.png?raw=true)
<p align="center">
<img width="800" src="https://github.com/HsuanXyz/hsuanxyz.github.io/blob/master/assets/ion2-calendar/calendar-1.png?raw=true">
</p>

@@ -176,3 +179,3 @@ > English is not my native language; please excuse typing errors.

| disableWeeks | Array<number> | `[]` | week to be disabled (0-6) |
| monthFormat | string | `'MMM yyyy'` | month title format |
| monthFormat | string | `'MMM YYYY'` | month title format |
| weekdays | Array<string> | `['S', 'M', 'T', 'W', 'T', 'F', 'S']` | weeks text |

@@ -293,3 +296,3 @@ | weekStart | number | `0` (0 or 1) | set week start day |

```
```typescript
import { NgModule, LOCALE_ID } from '@angular/core';

@@ -309,3 +312,3 @@ ...

const options: CalendarModalOptions = {
monthFormat: 'yyyy 年 MM 月 ',
monthFormat: 'YYYY 年 MM 月 ',
weekdays: ['天', '一', '二', '三', '四', '五', '六'],

@@ -383,3 +386,3 @@ weekStart: 1,

| doneIcon | boolean | `false` | show done button icon |
| monthFormat | string | `'MMM yyyy'` | month title format |
| monthFormat | string | `'MMM YYYY'` | month title format |
| weekdays | Array<string> | `['S', 'M', 'T', 'W', 'T', 'F', 'S']` | weeks text |

@@ -438,6 +441,6 @@ | weekStart | number | `0` (0 or 1) | set week start day |

```bash
cd ./dev
cd ./src
npm install
npm run ionic:serve
# do something in ./dev/src/components/ion2-calendar
# do something in ./src/src/components/ion2-calendar
```

@@ -448,4 +451,2 @@

```bash
cd ./
npm install
npm run build

@@ -452,0 +453,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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