R
R
rinatoptimus2015-11-01 14:16:27
JavaScript
rinatoptimus, 2015-11-01 14:16:27

How to change language in input Datepicker?

codepen.io/rinatoptimus/pen/WQymGR - the input is English, the Datepicker itself is in Russian. How to change language in input? Tried different options, none worked.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Osher, 2015-11-01
@rinatoptimus

stackoverflow.com/questions/494958/how-do-i-locali...

A
Alexander Latyshev, 2015-11-01
@magalex

Try to form the date like this:

new Date().toLocaleString('ru', {
        year: 'numeric',
        month: 'long',
        day: 'numeric'
      });

Description of the toLocaleString function

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question