0

I am using angular 7 and firebase. Now for searching in firebase database input text needs to be same like text in database. Now question: How to make pattern for date input like tihis: DD.MM.YYYY. nothing more, space not alowed or any other symbol but " . " It should be writed, no date picker.

Viktor Molnar
  • 99
  • 3
  • 13
  • Possible duplicate of [Is there any way to change input type="date" format?](https://stackoverflow.com/questions/7372038/is-there-any-way-to-change-input-type-date-format) – Heretic Monkey Mar 04 '19 at 17:03
  • Note that once you have a `Date` object from the `input`, you can format it any way you want. See [Where can I find documentation on formatting a date in JavaScript?](https://stackoverflow.com/questions/1056728/where-can-i-find-documentation-on-formatting-a-date-in-javascript)... – Heretic Monkey Mar 04 '19 at 17:05
  • @HereticMonkey my client needs date input for writing birth date, and he doesnt want to search in date picker, and its need to be dd.mm.yyyy. He wants to write in input field 01.01.1981. i cant convert that in Date() ... – Viktor Molnar Mar 04 '19 at 17:12
  • I'm not sure what you're talking about, but the duplicate notes that you cannot change the format of dates in an `input type="date"`. My second comment was to say that the format of the date in the input is irrelevant to how you format the date for searching. – Heretic Monkey Mar 04 '19 at 17:15

0 Answers0