change <input type="date"> to Persian Date

6.6k views Asked by At

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">

2

There are 2 answers

0
Ali On BEST ANSWER

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

0
deltastar On

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"