Date input widget

I am writing code in typescript angular for date input widget. In this I am not able to modify date and month once I entered full date. Tried so much things but still not able to implement.

There are some conditions which it needs to follows that are listed below:

I am trying to follow some of conditions for date input widget, here are those :

  1. Able to enter values (mm/dd/yyyy) like 1/1/2024 or 11/1/2024 or 11/12/2024. 2.after entering full year there should not be allowed to type anything after that
  2. Date and month should be modified at any time even after after entering full year means, If 1/1/2024 is entered and want to edit it as 10/12/2024 then it should be allowed
  3. Whole length must be max 10
  4. / this should not be repeated, if you see above format, like that it should work.