- ABP Framework version: v5.3.3
 - UI Type: Angular
 - Database System: EF Core (MySQL)
 - Tiered (for MVC) or Auth Server Separated (for Angular): yes
 - Exception message and full stack trace:
 - Steps to reproduce the issue:
 
Hi Support Team,
I am extending 2 more date fields to the form. I would like to ask if there a way to limit max date selection in the UI:
For example, the dates from 24th January onward should be greyed out & disabled, this could be done in other components with NgbInputDatepicker.maxDate. Is there a way to achieved similarly?
Hope to hear from you guys soon.
4 Answer(s)
- 
    0
Hi,
please check similar issue https://support.abp.io/QA/Questions/1464/Date-Field-Restrictions-and-Format
please let me know if found helpful
thanks
 - 
    0
Hello,
Please try with this code
Add in
.htmlfile<input readonly id="book-date" formControlName="date" class="form-control" [maxDate]="maxDate" ngbDatepicker #dateInput="ngbDatepicker" (click)="dateInput.open()" />Add in
.tsfilecurrentdate = new Date(); day = this.currentdate.getDate(); month = this.currentdate.getMonth() + 1; year = this.currentdate.getFullYear(); maxDate: NgbDateStruct = { year: this.year, month: this.month, day: this.day };and add this package
import { NgbDateStruct } from '@ng-bootstrap/ng-bootstrap';thanks
 - 
    0
Hi, could I ask what is the
selectorandtemplateUrlvalues of the popup? I want to try interfering with the HTML element directly by using angularngAfterViewInitto see if it works. - 
    0
 

