Replies: 1 comment 3 replies
-
Hello @kevalgw, Using the IgxDatePicker’s disabledDates property gets/sets the disabled dates descriptors and prevents a date to be selected from the dropdown dialog, however, this date could be typed manually in the input field and how this behavior should be handled is up to the developer. There are a few options depending on your requirement. For example, you could use the readOnly property and set it to true. This would disable the input field and selecting a date could be performed only from the dropdown. Another approach is using the minValue property along with the validationFailed event which is emitted when the user types an invalid date in the date-picker editor. When this event is emitted a certain action could be performed, e.g., clearing the input field A similar behavior could be achieved by using the valueChange event which is emitted when the date-picker's value changes. Here could be found a small sample demonstrating the above approaches. I hope it helps! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have disabled the back date in date picker. it is disabled in calendar.
But it is allowing me to enter the disabled date manually. Is there any way to control this behavior???
I have attached the ss for reference
Here the date is disabled as per requirement

But i am able to enter the disabled date manually by typing


Following is the html tag
<igx-date-picker
mode="dropdown"
[mask]="'dd-MM-yyyy'"
[format]="'dd-MM-yyyy'"
formControlName="date"
[disabledDates]="disabledDate"
(onSelection)="function($event)"
(valueChange)="function($event)">
Dep Date
Beta Was this translation helpful? Give feedback.
All reactions