Skip to content

Advanced: change model format

Fetrarijaona R edited this page Mar 30, 2018 · 1 revision

The default model's format is: {startDate: Moment, endDate: Moment}

To change this, you can specify with startKey and endKey

eg:

<input type="text" ngxDaterangepickerMd startKey="start_at" endKey="end_at" [(ngModel)]="selected" class="form-control"/>
export class AppComponent {
    selected = {start_at: moment(), end_at: moment().add('3', 'days')};
}
Clone this wiki locally