0

I'm using the default Angular 8 datepicker, and currently it is taking the format from the browser's language (English (US) is MM/DD/YYYY), and I'd like to force it to DD/MM/YYY.

How can I do this?

Here's my input with datepicker:

<input type="date" class="form-control" max="2070-12-31" name="arrivalDate" id="arrivalDate" required>
Alex Beugnet
  • 4,003
  • 4
  • 23
  • 40
f7n
  • 1,476
  • 3
  • 22
  • 42
  • 1
    That is not an Angular datepicker, but just the default html type datepicker based on your browser's implementation. – Silvermind Dec 16 '19 at 14:46
  • Ok, so the question remains: how can I change the format? – f7n Dec 16 '19 at 14:48
  • 4
    Does this answer your question? [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) – kvetis Dec 16 '19 at 14:49
  • If you are using web components such as ones provided by Angular Material, you can also integrate them with `Moment.js` which would allow you to handle different formats and locales efficiently. – Alex Beugnet Dec 16 '19 at 15:00

0 Answers0