Skip to content

Commit

Permalink
release: v1.0.7
Browse files Browse the repository at this point in the history
Fat:
DaysConfig add `cssClass`(#10).
Set first day of the week (#5).

Refactor:
export all module
  • Loading branch information
hsuanxyz committed Apr 24, 2017
1 parent 3e1e4ce commit 8dc548a
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 133 deletions.
2 changes: 2 additions & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,12 @@ daysConfig() {
| closeLabel | string | `cancel` | 取消按钮文字,可以为空 |
| monthTitle | string | `'MMM yyyy'` | 设置月份显示格式 |
| weekdaysTitle | Array<string> | `"Di_Lu_Ma_Me_Je_Ve_Sa".split("_")` | 星期显示格式 |
| weekStartDay | number | `0` (0 or 1) | 设置周的开始 |
| daysConfig | Array<***DaysConfig***> | `[]` | 按天配置 |
#### DaysConfig
| 参数名 | 类型 | 默认 | 描述 |
| ------------- | ------------- | -------- | --------------- |
| cssClass | string | `''` | 用空格隔开|
| date | Date | 必选 | 需要配置的天数时间对象 |
| marked | boolean | false | 是否高亮显示 |
| disable | boolean | false | 是否禁用 |
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,13 @@ daysConfig() {
| closeLabel | string | `cancel` | cancel button label ,can be an empty string |
| monthTitle | string | `'MMM yyyy'` | month title format |
| weekdaysTitle | Array<string> | `"Di_Lu_Ma_Me_Je_Ve_Sa".split("_")` | weeks title |
| weekStartDay | number | `0` (0 or 1) | set week start day |
| daysConfig | Array<***DaysConfig***> | `[]` | days configuration |

#### DaysConfig
| Name | Type | Default | Description |
| Name | Type | Default | Description
| ------------- | ------------- | -------- | --------------- |
| cssClass | string | `''` | separated by spaces|
| date | Date | required | configured days |
| marked | boolean | false | highlight color |
| disable | boolean | false | disable |
Expand Down Expand Up @@ -248,7 +250,7 @@ daysConfig() {
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))~~
5. Settings week start day
5. ~~Settings week start day([#5](https://github.com/HsuanXyz/ion2-calendar/issues/5))~~

# Environment
```
Expand Down
2 changes: 1 addition & 1 deletion demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NgModule, ErrorHandler, LOCALE_ID } from '@angular/core';
import { NgModule, ErrorHandler } from '@angular/core';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { AboutPage } from '../pages/about/about';
Expand Down
4 changes: 2 additions & 2 deletions demo/src/pages/home/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export class HomePage {
this.calendarCtrl.openCalendar({
monthTitle:'yyyy 年 MM 月 ',
weekdaysTitle:["天","一", "二", "三", "四", "五", "六"],
weekStartDay:1,
closeLabel:''
closeLabel:'',
weekStartDay:1
})
.then( (res:any) => { console.log(res) })
.catch( () => {} )
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ion2-calendar",
"version": "1.0.6",
"version": "1.0.7",
"description": "A date picker for ionic2 ",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
Expand Down
41 changes: 0 additions & 41 deletions src/calendar.html

This file was deleted.

86 changes: 0 additions & 86 deletions src/calendar.scss

This file was deleted.

1 change: 1 addition & 0 deletions src/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ export class CalendarPage{
disableWeekdays:params.get('disableWeekdays'),
monthTitle:params.get('monthTitle'),
};

CalendarPage.defaultDate = params.get('defaultDate');
CalendarPage.scrollBackwards = params.get('canBackwardsSelected');
CalendarPage.weekStartDay = params.get('weekStartDay');
Expand Down

0 comments on commit 8dc548a

Please sign in to comment.