primeNG calendar input invalid value

Viewed 51

when i key in an invalid value into the mode=range calendar inputbox enter image description here

<p-calendar fxFlex="265px" [showIcon]="true" selectionMode="range" inputId="range" [dateFormat]="yy/MM/dd"
            formControlName="glDate" placeholder="yyyy/mm/dd - yyyy/mm/dd">
        </p-calendar>

can I verify the user input value? because, when I get this.formgroup.glDate.value, that always show 「null」unless I type correctly format (ex: 2022/01/01 - 2022/06/06), so what can I validate this field?

User request :

  1. can manual entry range date, don't use readonlyInput = true.
  2. validation field input value, return error alert, or prohibit input invalid value.
0 Answers
Related