diff --git a/package.json b/package.json index ac4ddea..c6ffa3c 100644 --- a/package.json +++ b/package.json @@ -45,5 +45,7 @@ "typescript": "^2.3.1", "zone.js": "^0.8.9" }, - "dependencies": {} + "dependencies": { + "gulp": "^3.9.1" + } } diff --git a/src/components/datepicker-options.ts b/src/components/datepicker-options.ts index 4e66fb3..9a80292 100644 --- a/src/components/datepicker-options.ts +++ b/src/components/datepicker-options.ts @@ -11,4 +11,5 @@ export class AngularDatepickerOptions { weekendHighlight?: boolean = true; closeOnSelect?: boolean = true; modalMediaQuery?: string; + localeString?: string = 'en'; } \ No newline at end of file diff --git a/src/components/datepicker/datepicker.ts b/src/components/datepicker/datepicker.ts index 4215297..a851956 100644 --- a/src/components/datepicker/datepicker.ts +++ b/src/components/datepicker/datepicker.ts @@ -103,8 +103,14 @@ export class DatePickerComponent implements ControlValueAccessor, OnInit, AfterV this.options.closeOnSelect = this.opts.closeOnSelect; } else { this.options.closeOnSelect = this.options.closeOnSelect.toString() === 'true'; + } + if (typeof this.options.localeString === 'undefined') { + this.options.localeString = this.opts.localeString; } } + + moment.locale(this.options.localeString); + this.datePicker.mergeOptions(this.options); }