Skip to content

Commit

Permalink
Merge pull request gbrits#12 from szemel/master
Browse files Browse the repository at this point in the history
added multilanguage from momentjs lang files
  • Loading branch information
gbrits authored Aug 9, 2018
2 parents d8f79c1 + afe505b commit 8822f42
Show file tree
Hide file tree
Showing 14 changed files with 190 additions and 109 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ionic Calendar (English and Spanish)
# Ionic Calendar Multilanguage

![image](https://raw.githubusercontent.com/gbrits/ionic-calendar/master/calendar.png?raw=true)

Expand Down
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export { CalendarModule } from './src/calendar/calendar.module';
//# sourceMappingURL=index.js.map
"use strict";
exports.__esModule = true;
var calendar_module_1 = require("./src/calendar/calendar.module");
exports.CalendarModule = calendar_module_1.CalendarModule;
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"url": "https://github.com/gbrits/ionic-calendar/issues"
},
"homepage": "https://github.com/gbrits/ionic-calendar#readme",
"dependencies": {},
"dependencies": {
"moment": "^2.22.2"
},
"devDependencies": {
"typescript": "2.3.4"
}
Expand Down
4 changes: 2 additions & 2 deletions src/calendar/calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
</ion-row>

<ion-row>
<ion-col class="center calendar-header-col" *ngFor="let head of weekHead">{{head}}</ion-col>
<ion-col class="center calendar-header-col" *ngFor="let head of weekHead">{{head | weekdayName:lang}}</ion-col>
</ion-row>

<ion-row class="calendar-row" *ngFor="let week of weekArray;let i = index">
<ion-col class="center calendar-col" (click)="daySelect(day,i,j)" *ngFor="let day of week;let j = index" [ngClass]="[day.isThisMonth?'this-month':'not-this-month',day.isToday?'today':'',day.isSelect?'select':'']">
<ion-col class="center calendar-col" (click)="daySelect(day,i,j)" *ngFor="let day of week;let j = index" [ngClass]="[day.isThisMonth?'this-month':'not-this-month',day.isToday?'today':'',day.isSelect?'select':'',day.hasEvent?'has-event':'']">
{{day.date}}
<span class="eventBlip" *ngIf="day.hasEvent"></span>
</ion-col>
Expand Down
97 changes: 54 additions & 43 deletions src/calendar/calendar.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/calendar/calendar.js.map

Large diffs are not rendered by default.

48 changes: 26 additions & 22 deletions src/calendar/calendar.module.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { NgModule } from '@angular/core';
import { IonicModule } from 'ionic-angular';
import { Calendar } from './calendar';
import { monthName } from './pipes/month-name';
var CalendarModule = (function () {
exports.__esModule = true;
var core_1 = require("@angular/core");
var ionic_angular_1 = require("ionic-angular");
var calendar_1 = require("./calendar");
var month_name_1 = require("./pipes/month-name");
var weekday_name_1 = require("./pipes/weekday-name");
var CalendarModule = /** @class */ (function () {
function CalendarModule() {
}
CalendarModule = __decorate([
core_1.NgModule({
declarations: [
calendar_1.Calendar,
month_name_1.monthName,
weekday_name_1.weekdayName
],
imports: [
ionic_angular_1.IonicModule,
],
exports: [
calendar_1.Calendar,
month_name_1.monthName,
weekday_name_1.weekdayName
]
})
], CalendarModule);
return CalendarModule;
}());
CalendarModule = __decorate([
NgModule({
declarations: [
Calendar,
monthName
],
imports: [
IonicModule,
],
exports: [
Calendar,
monthName
]
})
], CalendarModule);
export { CalendarModule };
//# sourceMappingURL=calendar.module.js.map
exports.CalendarModule = CalendarModule;
7 changes: 5 additions & 2 deletions src/calendar/calendar.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ import { NgModule } from '@angular/core';
import { IonicModule } from 'ionic-angular';
import { Calendar } from './calendar';
import { monthName } from './pipes/month-name';
import {weekdayName} from "./pipes/weekday-name";
@NgModule({
declarations: [
Calendar,
monthName
monthName,
weekdayName
],
imports: [
IonicModule,
],
exports: [
Calendar,
monthName
monthName,
weekdayName
]
})
export class CalendarModule { }
Loading

0 comments on commit 8822f42

Please sign in to comment.