Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

66
Views
Dynamically set [max] value in Angular Mat Range picket

Max value in Mat ragepicker is not reflecting dynamically. I have replicated the same below. https://stackblitz.com/edit/angular-uc41kx-7a8m4h?file=src/app/date-range-picker-overview-example.html The below is what I have tried I wanted to limit the date selection to only 29 days. So when the date is changed the max value will be updated by startChange($event) function using (dateChange) event.

startChange(event: MatDatepickerInputEvent<Date>) {
    let maxDate;
    this.minDate = event.value;
    maxDate = moment(this.minDate).add(29, 'days').toDate();
    if (this.currentDate < maxDate) {
      this.currentDate =  moment().toDate() ;
    } else {
    this.currentDate = moment(this.minDate).add(29, 'days').toDate();
    }
  }

But with the above is not working,

Can anyone help me here.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!