Answers for "basic date range picker angular material 9.2.4"

0

date time picker in angular material

<input mdc-datetime-picker="" date="true" time="true" type="text" id="datetime"
placeholder="Date" show-todays-date="" minutes="true" min-date="date" show-icon="true"
ng-model="dateTime" class=" dtp-no-msclear dtp-input md-input">
Posted by: Guest on January-03-2021
0

Angular material date picker add dates automatically

As you are using Angular Reactive forms, you can listen for changes in the dateOne form control value through the valueChanges observable and set the dateTwo form control value.

this.form.get('dateOne')?.valueChanges.subscribe(date => {
  const dateTwo = formatDate(new Date()+ 7, 'MM/dd/yyyy', 'en');
  this.form.get('dateTwo')?.setValue(dateTwo);
});
Posted by: Guest on January-13-2022
-1

date range picker in angular 8

        preDefinedRanges: [{  safd          name: 'Day After tomorrow',                value: {                    start: moment().add(2, 'days'),                    end: moment().add(2, 'days'),                }            },{            name: 'This week',            value: {                start: moment(),                end: moment().add(7, 'days'),            }        }]
Posted by: Guest on April-04-2021

Browse Popular Code Answers by Language