Skip to content

Commit

Permalink
chore: cleanup datepicker (select) deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
maxokorokov committed Jan 9, 2020
1 parent 4fec3db commit 14d59b3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Expand Up @@ -101,7 +101,7 @@ <h4>Handling the popup</h4>
<ngbd-code [snippet]="snippets.form"></ngbd-code>

<p>
Alternatively you could use the <code>(dateSelect)</code> outputs.
Alternatively you could use the <code>(dateSelect)</code> output.
The difference from <code>ngModel</code> is that outputs will continue emitting the same value,
if user clicks on the same date. <code>NgModel</code> will do it only once.
</p>
Expand Down
3 changes: 0 additions & 3 deletions src/datepicker/datepicker-service.ts
Expand Up @@ -45,9 +45,6 @@ export class NgbDatepickerService {

get dateSelect$(): Observable<NgbDate> { return this._dateSelect$.pipe(filter(date => date !== null)); }

/** @deprecated please use `dateSelect$` */
get select$(): Observable<NgbDate> { return this.dateSelect$; }

set dayTemplateData(dayTemplateData: NgbDayTemplateData) {
if (this._state.dayTemplateData !== dayTemplateData) {
this._nextState({dayTemplateData});
Expand Down
3 changes: 2 additions & 1 deletion src/datepicker/datepicker.ts
Expand Up @@ -280,7 +280,8 @@ export class NgbDatepicker implements OnDestroy,
*
* The payload of the event is currently selected `NgbDate`.
*
* @deprecated please use 'dateSelect' event
* Please use 'dateSelect' output instead, this will be deprecated in version 6.0 due to collision with native
* 'select' event.
*/
@Output() select = this.dateSelect;

Expand Down

0 comments on commit 14d59b3

Please sign in to comment.