gijgo icon indicating copy to clipboard operation
gijgo copied to clipboard

Melhoria na documentação para usar datepicker com um formato especifico

Open matheusmurta opened this issue 5 years ago • 1 comments

When a user wants to use the datepicker with local and date-format specific, such as

<script>
      $('#datepicker').datepicker({
            uiLibrary: 'bootstrap4', 
            locale: 'pt-br',
            format: 'dd/mm/yyyy'
      });
   </script>

Please add a comment in your documentation stating that you need to import the script below:

<script src="https://unpkg.com/[email protected]/js/messages/messages.pt-br.js" type="text/javascript"></script>

In order to avoid the error below :

Uncaught TypeError: Cannot read property 'titleFormat' of undefined
    at Object.renderMonth (gijgo.min.js:1)
    at Object.open (gijgo.min.js:1)
    at HTMLSpanElement.<anonymous> (gijgo.min.js:1)
    at HTMLSpanElement.dispatch (jquery-3.3.1.min.js:2)
    at HTMLSpanElement.y.handle (jquery-3.3.1.min.js:2)

Note: If something already exists in the documentation and in the examples, I apologize for not finding the solution by browsing the documentation site.

matheusmurta avatar Jul 02 '19 02:07 matheusmurta

ao acrescentar o idioma na config é necessário também acrescentar o arquivo js que contem a tradução. o exemplo acima realmente funciona para todas as traduções disponíveis.

lippelima5 avatar Apr 05 '20 02:04 lippelima5