From 22b562d3b0023809d75d5be90e08dfce9b48efc9 Mon Sep 17 00:00:00 2001 From: HsuanXyz Date: Thu, 30 Mar 2017 13:25:34 +0800 Subject: [PATCH] chore(ionic): ion2-calendar 1.0.6 feat: Add default date, let the view scroll to the default date. feat: Scroll backwards.(#2) --- README-CN.md | 1 + README.md | 3 ++- demo/package.json | 2 +- demo/src/assets/icon/favicon.ico | Bin 0 -> 1981 bytes demo/src/pages/home/home.ts | 6 +++--- package.json | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 demo/src/assets/icon/favicon.ico diff --git a/README-CN.md b/README-CN.md index 84ff0346f..fed19cb48 100644 --- a/README-CN.md +++ b/README-CN.md @@ -188,6 +188,7 @@ daysConfig() { | defaultDate | Date | 无 | 让视图滚动到默认日期| | cssClass | string | `''` | 自定义css类,多个用空格分开 | | isRadio | boolean | `true` | 设置是否单选 ,如果为false则选择日期范围 | +| canBackwardsSelected | boolean | `false` | 能否向后选择 | | disableWeekdays | Array | `[]` | 需要禁用的星期数 (0-6,重0开始) | | closeLabel | string | `cancel` | 取消按钮文字,可以为空 | | monthTitle | string | `'MMM yyyy'` | 设置月份显示格式 | diff --git a/README.md b/README.md index 5806ef11a..5aaa4fb87 100644 --- a/README.md +++ b/README.md @@ -200,6 +200,7 @@ daysConfig() { | title | string | `'Calendar'` | title | | defaultDate | Date | none | let the view scroll to the default date| | cssClass | string | `''` | Additional classes for custom styles, separated by spaces. | +| canBackwardsSelected | boolean | `false` | can backwards selected | | isRadio | boolean | `true` | true for one day ,false for range dates | | disableWeekdays | Array | `[]` | week to be disabled (0-6) | | closeLabel | string | `cancel` | cancel button label ,can be an empty string | @@ -244,7 +245,7 @@ daysConfig() { 1. ~~Add style settings.~~ 2. ~~Add default date, let the view scroll to the default date.~~ 3. To today -4. Scroll backwards ([#2](https://github.com/HsuanXyz/ion2-calendar/issues/2)) +4. ~~Scroll backwards ([#2](https://github.com/HsuanXyz/ion2-calendar/issues/2))~~ # Environment ``` diff --git a/demo/package.json b/demo/package.json index 9611cd305..ed43d5e60 100644 --- a/demo/package.json +++ b/demo/package.json @@ -20,7 +20,7 @@ "@angular/platform-browser-dynamic": "2.2.1", "@angular/platform-server": "2.2.1", "@ionic/storage": "1.1.7", - "ion2-calendar": "^1.0.4", + "ion2-calendar": "^1.0.6", "ionic-angular": "2.1.0", "ionic-native": "2.4.1", "ionicons": "3.0.0", diff --git a/demo/src/assets/icon/favicon.ico b/demo/src/assets/icon/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..d76fa29d65b869e7df297c06a637b9dceef46966 GIT binary patch literal 1981 zcmV;u2SWIXP)ht(u000LX zNklWT>kj`X8C0K}-+Njke_yE))Es)eQR1zuV_Q&^k;d;G~bMM*b9_%}F=id39 zbJyN${q|mat?yd9ZTeR>YBF|5I}X9iFdpNuD@LFVo3I}1@Bmg}DOO@lGbcB!NpcUw zbR3F#m9d_W_uy05fM(|eLg-hhE>@Q1yQ9%2=@Oh=*=kLDK|S%smYyE=w*pR;C4cgEtUL+0 z`a5>78K?mcl0E-|=B#Q~S&Xo>9p(Q3^Gh<1q$hD(rkA8x|GFtswuR`lcqr{V*6+p|!4l1i`Y_Uw2` zq)x>5yMEAp3k;JudoiwVwI&6zTztd@*sU)EoQR1yt<^Jb0%l`J$ys_dz%X$n^Tn$+ z8zUutAB&xaV7$k0AwG#+dNROK;`HV=aS{jMGq@JF3q!ODcSuZsj>PrN!bO$NGdmx2 zJq3P?C-9ag4E$PIg42XR=?fjzT+WwtyEHDvoA6?`t$^LDNzN-gSWP0y-^r=cpYkNl zo{C?JLw-)-In9&A>6Kj#aI}Py3kwc3QvAtWgXbP+$!WCPApgH7+$6EV30(~^Lqf%d z__c2MA&xB|=Mel%IY-%np9r_OLk*+xDrMjPnRs_Wd9T-ZtUpj(C!z74HM~%A>Dvnl zf2laU(l`lkEF^1X^?PDXj;2k*+n2yudZC{R;9Lo28pRq(k`C+S+wWF};@Tf?Z<6xx z8fD^yEkfr{s0p8Tf1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@ export class HomePage { dateRange() { this.calendarCtrl.openCalendar({ isRadio: false, - scrollBackwards:true + canBackwardsSelected:true }) .then( (res:any) => { console.log(res) }) @@ -67,7 +67,7 @@ export class HomePage { disableWeekdays() { this.calendarCtrl.openCalendar({ disableWeekdays:[0,6], - scrollBackwards:true + canBackwardsSelected:true }) .then( (res:any) => { console.log(res) }) diff --git a/package.json b/package.json index 994cc4ac5..062b3e696 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ion2-calendar", - "version": "1.0.5", + "version": "1.0.6", "description": "A date picker for ionic2 ", "main": "./dist/index.js", "typings": "./dist/index.d.ts",