Skip to content

Commit

Permalink
Merge pull request #20 from quen09t/master
Browse files Browse the repository at this point in the history
i18n for picker button
  • Loading branch information
shiv19 authored May 1, 2018
2 parents a0b70ae + 61d6d1c commit b1a78e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export interface PickerOptions {
hour: number;
minute: number;
};
cancelLabel?: string;
doneLabel?: string;
}
export interface PickerResponse {
day?: number;
Expand Down
4 changes: 2 additions & 2 deletions src/modal-datetimepicker.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export class ModalDatetimepicker {
let cancelButton: UIButton = UIButton.buttonWithType(
UIButtonType.System
);
cancelButton.setTitleForState("Cancel", UIControlState.Normal);
cancelButton.setTitleForState(options.cancelLabel || "Cancel", UIControlState.Normal);
cancelButton.addTargetActionForControlEvents(
buttonHandler,
"close",
Expand All @@ -214,7 +214,7 @@ export class ModalDatetimepicker {
let doneButton: UIButton = UIButton.buttonWithType(
UIButtonType.System
);
doneButton.setTitleForState("Done", UIControlState.Normal);
doneButton.setTitleForState(options.doneLabel || "Done", UIControlState.Normal);
if (options.type === "date") {
doneButton.addTargetActionForControlEvents(
buttonHandler,
Expand Down

0 comments on commit b1a78e7

Please sign in to comment.