Date formatter for an input field which formats the given numbers in MM/DD/YYYY format which also accepts NA letters in Angular

I have a requirement where a user should enter date in "MM/DD/YYYY" if available or else should be able to enter "NA" in the input field. Here is the stackblitz link where I am trying to achieve this functionality.

[Formatter not Validation Regex]

Note: User should be able to enter numbers or only N and A in NA sequence in the input field. Date validation is not required but the formatted numbers should be in this way ../../…. OR NA.

9 thoughts on “Date formatter for an input field which formats the given numbers in MM/DD/YYYY format which also accepts NA letters in Angular”

Leave a Comment