Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/app/angular2-datetimepicker/datepicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class DatePicker implements OnInit, ControlValueAccessor {
}
day++;
}
dateRow.push({ day: dateCell, date: new Date((month + 1) + '-' + dateCell + '-' + date.getFullYear()) });
dateRow.push({ day: dateCell, date: new Date((month + 1) + '/' + dateCell + '/' + date.getFullYear()) });
}
// stop making rows if we've run out of days
if (day > monthLength) {
Expand All @@ -199,7 +199,6 @@ export class DatePicker implements OnInit, ControlValueAccessor {
}
}
return dateArr;

}
generateYearList(param: string) {
this.clickedToChangeYear = true;
Expand Down Expand Up @@ -461,7 +460,7 @@ export class DatePicker implements OnInit, ControlValueAccessor {
this.popover = false;
}
composeDate(date: Date) {
return (date.getMonth() + 1) + '-' + date.getDate() + '-' + date.getFullYear();
return (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear();
}
getCurrentWeek() {
var curr_date = new Date();
Expand Down