2

is there any way to simply change the <input type="date"> output, from Gregorian to Persian Date?
something like this:

var localToday = new Date().toLocaleDateString('fa-IR');
console.log(localToday);
<input type="date">
Ali
  • 91
  • 2
  • 9
  • Does this answer your question? [Is there a way to localize input type="date" in HTML5](https://stackoverflow.com/questions/2968817/is-there-a-way-to-localize-input-type-date-in-html5) – Abhishek Pandey Jul 08 '20 at 08:39
  • Actually, AFAIK this is not achievable, because the setting of `` in most browser strictly comes from browser settings. So since there is no Persian language in neither of the browsers this is impossible. – SMAKSS Jul 08 '20 at 08:41

2 Answers2

1

It is clear from your answers and comments that I need to use JavaScript DatePicker to achieve my goal.
After a lot of searching for that, i think its the better one: Link

Ali
  • 91
  • 2
  • 9
0

Reading the HTML documentation, I don't think there is a way to show another calendar in the input field.

input type="date"

input type="datetime-local"

deltastar
  • 45
  • 1
  • 10