gijgo
gijgo copied to clipboard
Melhoria na documentação para usar datepicker com um formato especifico
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.
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.