Datestart and dateend datepicker angular nativescript


#1

how can i make two datepicker one of datestart and the other for enddate i make like this but the date its the same for both of interface
picker.pickDate({
title: ‘Date debut’,
theme: ‘dark’,
maxDate: new Date(),
is24HourView: false
}).then((result) => {
this.user.datestart = result[‘year’] + ‘-’ + result[‘month’] + ‘-’ + result[‘day’];
this.user.dateend=result[‘year’] + ‘-’ + result[‘month’] + ‘-’ + result[‘day’];

}).catch((error) => {
console.log('Error: ’ + error);
});
and in componenT.html
<TextField hint=“Du” [(ngModel)]=“user.datestart” (tap)=“pickDate()” editable=“false” fontSize=“10”

            > </TextField>
        </StackLayout>
<StackLayout>
    <TextField hint="jusqu'à"  [(ngModel)]="user.dateend" (tap)="pickDate()" editable="false"  fontSize="10"
        ></TextField>