New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ng2-jalali-date-picker

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-jalali-date-picker - npm Package Compare versions

Comparing version 1.3.8 to 1.3.9

2

date-picker/date-picker.service.js

@@ -33,3 +33,3 @@ "use strict";

DatePickerService.prototype.getConfig = function (config) {
this.defaultConfig.format = (!config || (config.calendarSystem != calendar_type_enum_1.ECalendarSystem.gregorian)) ? 'jDD-jMM-jYYYY' : 'DD-MM-YYYY';
this.defaultConfig.format = (!config || (config.calendarSystem !== calendar_type_enum_1.ECalendarSystem.gregorian)) ? 'jDD-jMM-jYYYY' : 'DD-MM-YYYY';
var _config = __assign({}, this.defaultConfig, this.utilsService.clearUndefined(config));

@@ -36,0 +36,0 @@ var min = _config.min, max = _config.max, format = _config.format;

@@ -53,3 +53,3 @@ "use strict";

DayCalendarComponent.prototype.isJalali = function () {
return this.componentConfig.calendarSystem != calendar_type_enum_1.ECalendarSystem.gregorian;
return this.componentConfig.calendarSystem !== calendar_type_enum_1.ECalendarSystem.gregorian;
};

@@ -56,0 +56,0 @@ DayCalendarComponent.prototype.ngOnChanges = function (changes) {

@@ -57,7 +57,6 @@ "use strict";

this.DEFAULT_CONFIG = this.JALALI_DEFAULT_CONFIG;
moment.loadPersian();
}
DayCalendarService.prototype.getMonthFormat = function (config) {
if (config === void 0) { config = this.DEFAULT_CONFIG; }
return (config.calendarSystem != calendar_type_enum_1.ECalendarSystem.gregorian) ? "jMonth" : "month";
return (config.calendarSystem !== calendar_type_enum_1.ECalendarSystem.gregorian) ? 'jMonth' : 'month';
};

@@ -74,3 +73,9 @@ DayCalendarService.prototype.removeNearMonthWeeks = function (currentMonth, monthArray) {

DayCalendarService.prototype.getConfig = function (config) {
this.DEFAULT_CONFIG = (!config || (config.calendarSystem != calendar_type_enum_1.ECalendarSystem.gregorian)) ? this.JALALI_DEFAULT_CONFIG : this.GREGORIAN_DEFAULT_CONFIG;
if (!config || (config.calendarSystem !== calendar_type_enum_1.ECalendarSystem.gregorian)) {
moment.loadPersian();
this.DEFAULT_CONFIG = this.JALALI_DEFAULT_CONFIG;
}
else {
this.DEFAULT_CONFIG = this.GREGORIAN_DEFAULT_CONFIG;
}
return __assign({}, this.DEFAULT_CONFIG, this.utilsService.clearUndefined(config));

@@ -144,4 +149,5 @@ };

}
if (config.calendarSystem != calendar_type_enum_1.ECalendarSystem.gregorian)
if (config.calendarSystem !== calendar_type_enum_1.ECalendarSystem.gregorian) {
month.locale('fa');
}
return month.format(config.monthFormat);

@@ -148,0 +154,0 @@ };

@@ -76,3 +76,3 @@ "use strict";

MonthCalendarComponent.prototype.isJalali = function () {
return this.componentConfig.calendarSystem != calendar_type_enum_1.ECalendarSystem.gregorian;
return this.componentConfig.calendarSystem !== calendar_type_enum_1.ECalendarSystem.gregorian;
};

@@ -79,0 +79,0 @@ MonthCalendarComponent.prototype.processOnChangeCallback = function (value) {

@@ -35,10 +35,11 @@ "use strict";

if (config === void 0) { config = this.DEFAULT_CONFIG; }
return (config.calendarSystem != calendar_type_enum_1.ECalendarSystem.gregorian) ? 'jMonth' : 'month';
return (config.calendarSystem !== calendar_type_enum_1.ECalendarSystem.gregorian) ? 'jMonth' : 'month';
};
MonthCalendarService.prototype.getMomentYearFormat = function (config) {
if (config === void 0) { config = this.DEFAULT_CONFIG; }
return (config.calendarSystem != calendar_type_enum_1.ECalendarSystem.gregorian) ? 'jYear' : 'year';
return (config.calendarSystem !== calendar_type_enum_1.ECalendarSystem.gregorian) ? 'jYear' : 'year';
};
MonthCalendarService.prototype.getConfig = function (config) {
this.DEFAULT_CONFIG = (config.calendarSystem != calendar_type_enum_1.ECalendarSystem.gregorian) ? this.JALALI_DEFAULT_CONFIG : this.GREGORIAN_DEFAULT_CONFIG;
this.DEFAULT_CONFIG = (config.calendarSystem !== calendar_type_enum_1.ECalendarSystem.gregorian) ?
this.JALALI_DEFAULT_CONFIG : this.GREGORIAN_DEFAULT_CONFIG;
return __assign({}, this.DEFAULT_CONFIG, this.utilsService.clearUndefined(config));

@@ -45,0 +46,0 @@ };

{
"name": "ng2-jalali-date-picker",
"author": "Mojtaba Zarei",
"version": "1.3.8",
"version": "1.3.9",
"license": "MIT",

@@ -33,3 +33,6 @@ "main": "index.js",

"datepicker",
"datepicker farsi"
"datepicker farsi",
"typescript",
"ts",
"farsi"
],

@@ -40,3 +43,3 @@ "dependencies": {

"devDependencies": {
"@angular/cli": "^1.0.1",
"@angular/cli": "^1.0.4",
"@angular/common": "^4.0.3",

@@ -43,0 +46,0 @@ "@angular/compiler": "^4.0.3",

@@ -6,3 +6,3 @@ [![Build Status](https://travis-ci.org/fingerpich/jalali-angular-datepicker.svg?branch=master)](https://travis-ci.org/fingerpich/jalali-angular-datepicker)

# Jalali Date Picker
This is a configurable jalali date-picker build for Angular2 applications and uses MomentJS as its dependency.
This is a configurable jalali date-picker build for Angular (2 or more) applications and uses MomentJS as its dependency.
[DEMO](https://fingerpich.github.io/jalali-angular-datepicker/)

@@ -13,3 +13,3 @@

`npm install ng2-jalali-date-picker --save`
2. import the `DpDatePickerModule` module:
2. import the `DpDatePickerModule` module in typescript (.ts) or es6 files like below:
`import {DpDatePickerModule} from 'ng2-jalali-date-picker';`

@@ -16,0 +16,0 @@ 3. Add `DpDatePickerModule` to your module imports:

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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