input date html5

1

I've been looking for html5 settings for the date attribute to display the date in the format we use in Brazil (dd / mm / yyyy), but it looks like it does not have any extra settings for it. In some tutorials the default format is already this, but my calendar is displayed in the default yyyy / mm / dd. Any solution for this?

<html>
<head>
    <meta charset="UTF-8">
</head>
<body oncontextmenu='return false' onselectstart='return false' ondragstart='return false'>  <!-- Não deixa o usuário clicar com o botão direito na página -->
    <div class="container clearfix">
        <?php
            include "header.php";
        ?>
            <div class="conteudo_painel">
                <h1>Painel do Cliente - <?php echo $_SESSION['nome_cliente']; ?></h1> <!-- Nome do cliente para mostrar no painel -->
                <!-- Div sobre o boleto -->
                    <div class="segunda_via">
                        <h2>2ª via do boleto</h2>
                        <h4>Escolha a data que efetuará o pagamento:</h4>
                        <form method="post" action="?acao=confirmar">
                            </br><input type="date" id="data" name="data" maxlength="10" size="" OnKeyPress=" formatar('##/##/####', this)">
                            </br><input type="image" src="img/gera_boleto.png" value="Confirmar" id="gera_boleto">
                        </form>
                    </div>
                    <?php
                        } else { //caso o boleto não tenha vencido e o cliente não tenha pago, mostra o boleto primeira via
                    ?>
                        <div class="boleto_itau" >
...

    
asked by anonymous 11.05.2015 / 17:50

1 answer

1

Try this:

<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8" />
</head>

Here's an example using the datepicker en, where it is available at: link github jquery.ui.datepicker-en-BR.js

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>teste</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script><scriptsrc="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
    <script src="datepicker-pt-BR.js"></script>
    <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
    <script>
        $(function() {
            $( "#datepicker" ).datepicker();
        });
   </script>
</head>
<body>

<p>Data: <input type="text" id="datepicker"></p>

</body>
</html>
    
11.05.2015 / 18:35