Skip to content

Commit

Permalink
fix(old-datepicker): summer time (#3122)
Browse files Browse the repository at this point in the history
* fix(datepicker): calendar repeat days (ex:. 15-oct-2017) when using safari for lang pt-br in summer time

* fix(datepicker): calendar repeat days (ex:. 15-oct-2017) when using safari for lang pt-br in summer time
  • Loading branch information
mdfonseca authored and valorkin committed Dec 5, 2017
1 parent 17b84a2 commit 422d3bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/datepicker/datepicker-inner.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* tslint:disable:max-file-line-count */
/* tslint:disable:max-file-line-count */
import {
Component,
EventEmitter,
Expand Down Expand Up @@ -219,6 +219,7 @@ export class DatePickerInnerComponent implements OnInit, OnChanges {
date.getMonth(),
date.getDate()
);
dateObject.date = this.fixTimeZone(dateObject.date);
dateObject.label = this.dateFilter(date, format);
dateObject.selected = this.compare(date, this.selectedDate) === 0;
dateObject.disabled = this.isDisabled(date);
Expand Down Expand Up @@ -265,6 +266,7 @@ export class DatePickerInnerComponent implements OnInit, OnChanges {
date.getMonth(),
date.getDate()
);
this.activeDate = this.fixTimeZone(this.activeDate);
if (isManual) {
this.selectionDone.emit(this.activeDate);
}
Expand All @@ -274,6 +276,7 @@ export class DatePickerInnerComponent implements OnInit, OnChanges {
date.getMonth(),
date.getDate()
);
this.activeDate = this.fixTimeZone(this.activeDate);
if (isManual) {
this.datepickerMode = this.modes[
this.modes.indexOf(this.datepickerMode) - 1
Expand Down
8 changes: 4 additions & 4 deletions src/datepicker/daypicker.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @deprecated
// @deprecated
// tslint:disable
import { Component, OnInit } from '@angular/core';
import { isBs3 } from '../utils/theme-provider';
Expand Down Expand Up @@ -179,9 +179,9 @@ export class DayPickerComponent implements OnInit {
date = this.datePicker.fixTimeZone(date);
dates[i++] = date;
current = new Date(
current.getFullYear(),
current.getMonth(),
current.getDate() + 1
date.getFullYear(),
date.getMonth(),
date.getDate() + 1
);
}
return dates;
Expand Down

0 comments on commit 422d3bc

Please sign in to comment.