-
Notifications
You must be signed in to change notification settings - Fork 136
Open
Description
jqxDateTimeInput with range selection, min and max date when formControl.setValue() mehtod is used it removes the min and max date restrictions and the user can select other dates.
When using the formControl.reset() method in the same setup the popup calendar dates inside of it are displayed as NaN.

Code for reproducing the issue:
In app.component.html
<jqxDateTimeInput
placeHolder="Plaholder here"
#myDateTimeInput
selectionMode="range"
[min]="minDate"
[max]="maxDate"
[formControl]= "date"
(onValueChanged)="dateChange($event)">>
</jqxDateTimeInput>
<p>{{date.value}}</p>
<button (click)="setValue($event)">Set Value</button>
<button (click)="resetValue($event)">Reset Value</button>
app.component.ts:
date = new FormControl(new Date(2021, 8, 1, 12, 0, 0));
maxDate = new Date();
minDate: any = new Date(2021, 8, 10);
dateChange = (event: Event):void => {
console.log(event);
};
setValue():void {
this.date.setValue({});
}
resetValue():void {
this.date.reset();
}
Metadata
Metadata
Assignees
Labels
No labels