Skip to content

Commit

Permalink
primefaces#2941 Fixes issue with updating model
Browse files Browse the repository at this point in the history
  • Loading branch information
gardinit authored Jun 19, 2017
1 parent 9e8e03a commit 9c5e202
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/components/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,11 @@ export class Calendar implements AfterViewInit,AfterViewChecked,OnInit,OnDestroy
}

updateModel() {
if(this.dataType == 'date'){
this.onModelChange(new Date(this.value));
if (this.dataType == 'date') {
if (this.timeOnly)
this.onModelChange(new Date(this.value));
else
this.onModelChange(this.value);
}
else if(this.dataType == 'string') {
if(this.timeOnly)
Expand Down

1 comment on commit 9c5e202

@cagataycivici
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in a different way, thank you.

Please sign in to comment.