JQuery datepicker - date format to dd / mm / yy

I am trying to change our dumper from: mm / dd / yyyy (jquery mm / dd / yy) to: dd / mm / yyyy (jquery dd / mm / yy).

At first I tried to use parseDate so as not to affect, then we tried formatDate

Does anyone know if there is a way to do this? Note: we use jquery ui frame work

 $(function() {
  $( ".datepicker" ).datepicker();

 });

early

+3
source share
2 answers

Try the following:

$( ".datepicker" ).datepicker();
$( ".datepicker" ).datepicker('option', 'dateFormat' , 'dd/mm/yy');
+4
source

You can use the option dateFormat:

$( ".datepicker" ).datepicker({ dateFormat: 'dd/mm/yy' });
+4
source

Source: https://habr.com/ru/post/1778076/


All Articles