Skip to content

Commit

Permalink
fix(datetime): fix property dayNames (it was using dayShort)
Browse files Browse the repository at this point in the history
clean up API docs

references #5010
  • Loading branch information
brandyscarney committed May 16, 2016
1 parent 9fbcfc7 commit 0bd736d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions ionic/components/datetime/datetime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ const DATETIME_VALUE_ACCESSOR = new Provider(
* ```ts
* @App({
* config: {
* monthNames: ['janeiro, 'fevereiro', 'mar\u00e7o', ... ],
* monthNames: ['janeiro', 'fevereiro', 'mar\u00e7o', ... ],
* monthShortNames: ['jan', 'fev', 'mar', ... ],
* dayNames: ['domingo', 'segunda-feira', 'ter\u00e7a-feira', ... ],
* dayShortNames: ['dom', 'seg', 'ter', ... ],
Expand All @@ -215,10 +215,10 @@ const DATETIME_VALUE_ACCESSOR = new Provider(
* <ion-label>Período</ion-label>
* <ion-datetime displayFormat="DDDD MMM D, YYYY"
* [(ngModel)]="myDate"
* monthNames="['janeiro, 'fevereiro', 'mar\u00e7o', ... ]"
* monthShortNames="['jan', 'fev', 'mar', ... ]"
* dayNames="['domingo', 'segunda-feira', 'ter\u00e7a-feira', ... ]"
* dayShortNames="['dom', 'seg', 'ter', ... ]"
* monthNames="[janeiro, fevereiro, mar\u00e7o, ... ]"
* monthShortNames="[jan, fev, mar, ... ]"
* dayNames="[domingo, segunda-feira, ter\u00e7a-feira, ... ]"
* dayShortNames="[dom, seg, ter, ... ]"
* ></ion-datetime>
* </ion-item>
* ```
Expand Down Expand Up @@ -406,7 +406,7 @@ export class DateTime {
@Input() dayShortNames: any;

/**
* @input {any} Any addition options that the picker interface can accept.
* @input {any} Any additional options that the picker interface can accept.
* See the [Picker API docs](../../picker/Picker) for the picker options.
*/
@Input() pickerOptions: any = {};
Expand Down
4 changes: 2 additions & 2 deletions ionic/util/datetime-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function renderTextFormat(format: string, value: any, date: DateTimeData,
value = (new Date(date.year, date.month - 1, date.day)).getDay();

if (format === FORMAT_DDDD) {
return (isPresent(locale.dayShort) ? locale.dayShort : DAY_NAMES)[value];
return (isPresent(locale.dayNames) ? locale.dayNames : DAY_NAMES)[value];
}

return (isPresent(locale.dayShortNames) ? locale.dayShortNames : DAY_SHORT_NAMES)[value];
Expand Down Expand Up @@ -402,7 +402,7 @@ export interface DateTimeData {
export interface LocaleData {
monthNames?: string[];
monthShortNames?: string[];
dayShort?: string[];
dayNames?: string[];
dayShortNames?: string[];
}

Expand Down

0 comments on commit 0bd736d

Please sign in to comment.