Skip to content

Commit

Permalink
release: 2.0.0-beta.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz committed Jul 11, 2017
1 parent ad4f4a0 commit c9cc0d6
Show file tree
Hide file tree
Showing 44 changed files with 524 additions and 1,109 deletions.
1,149 changes: 188 additions & 961 deletions demo/package-lock.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions demo/src/pages/home/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
</ion-header>

<ion-content>

<ion-calendar [color]="'secondary'"
[weekStartDay]="1"
[disableWeekdays]="[0,1]"></ion-calendar>

<ion-list>
<button ion-item (click)="basic()">
basic
Expand Down
24 changes: 4 additions & 20 deletions demo/src/pages/home/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,19 @@ export class HomePage {
basic() {

this.calendarCtrl.openCalendar({
id:'1',
title:'basic demo',
canBackwardsSelected:true,
isSaveHistory:true,
showYearPicker:true,
closeIcon: true
color:'secondary',
doneIcon: true
})
.then( (res:any) => { console.log(res) })
.catch( () => {} );
}

setDefaultDate() {
this.calendarCtrl.openCalendar({
id:'2',
from: new Date(2017,1,1),
defaultDate:new Date(2017,4,1),
showYearPicker:true,

})
.then( (res:any) => { console.log(res) })
Expand All @@ -44,7 +40,6 @@ export class HomePage {

setCssClass() {
this.calendarCtrl.openCalendar({
id:'3',
cssClass:'my-class',
isRadio: false,
})
Expand All @@ -54,24 +49,18 @@ export class HomePage {

dateRange() {
this.calendarCtrl.openCalendar({
id:'4',
isRadio: false,
canBackwardsSelected:true,
isSaveHistory:true,
showYearPicker:true,


autoDone: true
})
.then( (res:any) => { console.log(res) })
.catch( () => {} )
}

maxAndMin() {
this.calendarCtrl.openCalendar({
id:'5',
from: new Date(2017,1,1),
to : new Date(2017,2,5),
showYearPicker:true,

})
.then( (res:any) => { console.log(res) })
Expand All @@ -80,10 +69,8 @@ export class HomePage {

disableWeekdays() {
this.calendarCtrl.openCalendar({
id:'6',
disableWeekdays:[0,6],
canBackwardsSelected:true,
showYearPicker:true,

})
.then( (res:any) => { console.log(res) })
Expand All @@ -92,12 +79,10 @@ export class HomePage {

settingDisplay() {
this.calendarCtrl.openCalendar({
id:'7',
monthTitle:'yyyy 年 MM 月 ',
weekdaysTitle:["天","一", "二", "三", "四", "五", "六"],
closeLabel:'',
closeLabel:'关闭',
weekStartDay:1,
showYearPicker:true,

})
.then( (res:any) => { console.log(res) })
Expand Down Expand Up @@ -146,7 +131,6 @@ export class HomePage {
_daysConfig.push(...this.days);

this.calendarCtrl.openCalendar({
id:'8',
from: new Date(2017,0,1),
to : new Date(2017,11.1),
daysConfig:_daysConfig,
Expand Down
34 changes: 8 additions & 26 deletions dist/calendar.controller.js

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

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

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

5 changes: 5 additions & 0 deletions dist/calendar.model.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export interface ModalOptions {
leaveAnimation?: string;
}
export interface CalendarControllerOptions {
autoDone?: boolean;
from?: Date;
cssClass?: string;
to?: Date | number;
Expand All @@ -61,8 +62,11 @@ export interface CalendarControllerOptions {
disableWeekdays?: Array<number>;
weekdaysTitle?: Array<string>;
closeLabel?: string;
doneLabel?: string;
closeIcon?: boolean;
doneIcon?: boolean;
monthTitle?: string;
color?: string;
canBackwardsSelected?: boolean;
title?: string;
defaultDate?: Date;
Expand All @@ -76,3 +80,4 @@ export interface CalendarControllerOptions {
subTitle?: string;
}>;
}
export declare type Colors = 'primary' | 'secondary' | 'danger' | 'light' | 'dark';
13 changes: 7 additions & 6 deletions dist/calendar.module.js

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

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

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

2 changes: 1 addition & 1 deletion dist/calendar.module.metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"__symbolic":"module","version":3,"metadata":{"CalendarModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"ionic-angular","name":"IonicModule"},{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","module":"./components/calendar-component","name":"CalendarComponent"},{"__symbolic":"reference","module":"./components/calendar-week-component","name":"CalendarWeekComponent"},{"__symbolic":"reference","module":"./components/month-component","name":"MonthComponent"}],"providers":[{"__symbolic":"reference","module":"./calendar.controller","name":"CalendarController"},{"__symbolic":"reference","module":"./services/calendar.service","name":"CalendarService"}],"exports":[],"entryComponents":[{"__symbolic":"reference","module":"./components/calendar-component","name":"CalendarComponent"}],"schemas":[{"__symbolic":"reference","module":"@angular/core","name":"CUSTOM_ELEMENTS_SCHEMA"}]}]}]}}},{"__symbolic":"module","version":1,"metadata":{"CalendarModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"ionic-angular","name":"IonicModule"},{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","module":"./components/calendar-component","name":"CalendarComponent"},{"__symbolic":"reference","module":"./components/calendar-week-component","name":"CalendarWeekComponent"},{"__symbolic":"reference","module":"./components/month-component","name":"MonthComponent"}],"providers":[{"__symbolic":"reference","module":"./calendar.controller","name":"CalendarController"},{"__symbolic":"reference","module":"./services/calendar.service","name":"CalendarService"}],"exports":[],"entryComponents":[{"__symbolic":"reference","module":"./components/calendar-component","name":"CalendarComponent"}],"schemas":[{"__symbolic":"reference","module":"@angular/core","name":"CUSTOM_ELEMENTS_SCHEMA"}]}]}]}}}]
[{"__symbolic":"module","version":3,"metadata":{"CalendarModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"ionic-angular","name":"IonicModule"},{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","module":"./components/calendar.modal","name":"CalendarModal"},{"__symbolic":"reference","module":"./components/calendar-week.component","name":"CalendarWeekComponent"},{"__symbolic":"reference","module":"./components/month.component","name":"MonthComponent"},{"__symbolic":"reference","module":"./components/calendar.component","name":"CalendarComponent"}],"providers":[{"__symbolic":"reference","module":"./calendar.controller","name":"CalendarController"},{"__symbolic":"reference","module":"./services/calendar.service","name":"CalendarService"}],"exports":[{"__symbolic":"reference","module":"./components/calendar.component","name":"CalendarComponent"}],"entryComponents":[{"__symbolic":"reference","module":"./components/calendar.modal","name":"CalendarModal"}],"schemas":[{"__symbolic":"reference","module":"@angular/core","name":"CUSTOM_ELEMENTS_SCHEMA"}]}]}]}}},{"__symbolic":"module","version":1,"metadata":{"CalendarModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"ionic-angular","name":"IonicModule"},{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","module":"./components/calendar.modal","name":"CalendarModal"},{"__symbolic":"reference","module":"./components/calendar-week.component","name":"CalendarWeekComponent"},{"__symbolic":"reference","module":"./components/month.component","name":"MonthComponent"},{"__symbolic":"reference","module":"./components/calendar.component","name":"CalendarComponent"}],"providers":[{"__symbolic":"reference","module":"./calendar.controller","name":"CalendarController"},{"__symbolic":"reference","module":"./services/calendar.service","name":"CalendarService"}],"exports":[{"__symbolic":"reference","module":"./components/calendar.component","name":"CalendarComponent"}],"entryComponents":[{"__symbolic":"reference","module":"./components/calendar.modal","name":"CalendarModal"}],"schemas":[{"__symbolic":"reference","module":"@angular/core","name":"CUSTOM_ELEMENTS_SCHEMA"}]}]}]}}}]
Loading

0 comments on commit c9cc0d6

Please sign in to comment.